home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MPW 411 / CIncludesHelp < prev    next >
Encoding:
Text File  |  1991-04-08  |  3.0 MB  |  104,687 lines  |  [TEXT/MPS ]

Text Truncated. Only the first 1MB is shown below. Download the file for the complete contents.
  1. æKY CopyrightNotice
  2. æC  Copyright Apple Computer, Inc. 1985-1991, All rights reserved.
  3. 411 - CIncludes Help - MPW 3.2 Final Release. 
  4. Friday, April  5, 1991 1:22:42 PM
  5.  
  6. æKY Help
  7. CIncludesHelp
  8. æKL AboutCIncludesHelp
  9. ADSP.h
  10. AIFF.h
  11. Aliases.h
  12. AppleEvents.h
  13. Appletalk.h
  14. Balloons.h
  15. CommResources.h
  16. Connections.h
  17. ConnectionTools.h
  18. Controls.h
  19. CRMSerialDevices.h
  20. CTBUtilities.h
  21. CursorCtl.h
  22. DatabaseAccess.h
  23. Desk.h
  24. Deskbus.h
  25. Devices.h
  26. Dialogs.h
  27. DisAsmLookup.h
  28. DiskInit.h
  29. Disks.h
  30. Editions.h
  31. ENET.h
  32. EPPC.h
  33. ErrMgr.h
  34. Errors.h
  35. Events.h
  36. Files.h
  37. FileTransfers.h
  38. FileTransferTools.h
  39. Finder.h
  40. FixMath.h
  41. Folders.h
  42. Fonts.h
  43. Globals.h
  44. GestaltEqu.h
  45. Graf3D.h
  46. HyperXCmd.h
  47. Icons.h
  48. Language.h
  49. Lists.h
  50. Math.h
  51. Memory.h
  52. Menus.h
  53. Notification.h
  54. OSEvents.h
  55. OSUtils.h
  56. Packages.h
  57. Palettes.h
  58. Perf.h
  59. Picker.h
  60. PictUtil.h
  61. Power.h
  62. PPCToolBox.h
  63. Printing.h
  64. Processes.h
  65. QDOffscreen.h
  66. Quickdraw.h
  67. Resources.h
  68. Retrace.h
  69. ROMDefs.h
  70. SANE.h
  71. Scrap.h
  72. Script.h
  73. SCSI.h
  74. Segload.h
  75. Serial.h
  76. ShutDown.h
  77. Slots.h
  78. Sound.h
  79. SoundInput.h
  80. StandardFile.h
  81. Start.h
  82. Strings.h
  83. SysEqu.h
  84. Terminals.h
  85. TerminalTools.h
  86. TextEdit.h
  87. Timer.h
  88. ToolUtils.h
  89. Traps.h
  90. Types.h
  91. Video.h
  92. Windows.h
  93.  
  94. StdCLib
  95.  
  96. Assert.h
  97. Ctype.h
  98. Errno.h
  99. FCntl.h
  100. Float.h
  101. IOCtl.h
  102. Limits.h
  103. Locale.h
  104. Math.h
  105. SetJmp.h
  106. Signal.h
  107. StdArg.h
  108. StdDef.h
  109. StdIO.h
  110. StdLib.h
  111. String.h
  112. Time.h
  113.  
  114. æKY AboutCincludesHelp
  115. æC
  116. __________________________________________________________________
  117.  
  118. Version 1.0 Final  --  MPW 3.2 Final
  119.  
  120. Contains Nets & Comm Interface information and bug fixes.
  121.  
  122. __________________________________________________________________
  123.  
  124. Version 1.0 Beta 6 -- ETO #3
  125.  
  126. Contains updated InsideMachintosh Volume VI information. 
  127. __________________________________________________________________
  128.  
  129. Version 1.0 Beta --  ETO#2
  130.  
  131. This version contains the InsideMacintosh Volume VI information.
  132.  
  133. æKY ADSP.h
  134. æKL 
  135. attnBufSize
  136. dspAttention
  137. dspCLDeny
  138. dspCLInit
  139. dspCLListen
  140. dspClose
  141. dspCLRemove
  142. dspInit
  143. dspNewCID
  144. dspOpen
  145. dspOptions
  146. DSPParamBlock
  147. DSPPBPtr
  148. dspRead
  149. dspRemove
  150. dspReset
  151. dspStatus
  152. dspWrite
  153. eAttention
  154. eClosed
  155. eFwdReset
  156. errAborted
  157. errAttention
  158. errDSPQueueSize
  159. errFwdReset
  160. errOpenDenied
  161. errOpening
  162. errRefNum
  163. errState
  164. eTearDown
  165. minDSPQueueSize
  166. ocAccept
  167. ocEstablish
  168. ocPassive
  169. ocRequest
  170. sClosed
  171. sClosing
  172. sListening
  173. sOpen
  174. sOpening
  175. sPassive
  176. TPCCB
  177. TRattnParams
  178. TRCCB
  179. TRcloseParams
  180. TRinitParams
  181. TRioParams
  182. TRnewcidParams
  183. TRopenParams
  184. TRoptionParams
  185. TRstatusParams
  186.  
  187. æKY errRefNum
  188. æFc ADSP.h
  189. æT #define
  190. æD #define errRefNum -1280 /* bad connection refNum */
  191. æC 
  192.  
  193. æKY errAborted
  194. æFc ADSP.h
  195. æT #define
  196. æD #define errAborted -1279 /* control call was aborted */
  197. æC 
  198.  
  199. æKY errState
  200. æFc ADSP.h
  201. æT #define
  202. æD #define errState -1278 /* bad connection state for this operation */
  203. æC 
  204.  
  205. æKY errOpening
  206. æFc ADSP.h
  207. æT #define
  208. æD #define errOpening -1277 /* open connection request failed */
  209. æC 
  210.  
  211. æKY errAttention
  212. æFc ADSP.h
  213. æT #define
  214. æD #define errAttention -1276 /* attention message too long */
  215. æC 
  216.  
  217. æKY errFwdReset
  218. æFc ADSP.h
  219. æT #define
  220. æD #define errFwdReset -1275 /* read terminated by forward reset */
  221. æC 
  222.  
  223. æKY errDSPQueueSize
  224. æFc ADSP.h
  225. æT #define
  226. æD #define errDSPQueueSize -1274 /* DSP Read/Write Queue Too small */
  227. æC 
  228.  
  229. æKY errOpenDenied
  230. æFc ADSP.h
  231. æT #define
  232. æD #define errOpenDenied -1273 /* open connection request was denied */
  233. æC 
  234.  
  235. æKY dspInit
  236. æFc ADSP.h
  237. æT #define
  238. æD #define dspInit 255 /* create a new connection end */
  239. æC 
  240.  
  241. æKY dspRemove
  242. æFc ADSP.h
  243. æT #define
  244. æD #define dspRemove 254 /* remove a connection end */
  245. æC 
  246.  
  247. æKY dspOpen
  248. æFc ADSP.h
  249. æT #define
  250. æD #define dspOpen 253 /* open a connection */
  251. æC 
  252.  
  253. æKY dspClose
  254. æFc ADSP.h
  255. æT #define
  256. æD #define dspClose 252 /* close a connection */
  257. æC 
  258.  
  259. æKY dspCLInit
  260. æFc ADSP.h
  261. æT #define
  262. æD #define dspCLInit 251 /* create a connection listener */
  263. æC 
  264.  
  265. æKY dspCLRemove
  266. æFc ADSP.h
  267. æT #define
  268. æD #define dspCLRemove 250 /* remove a connection listener */
  269. æC 
  270.  
  271. æKY dspCLListen
  272. æFc ADSP.h
  273. æT #define
  274. æD #define dspCLListen 249 /* post a listener request */
  275. æC 
  276.  
  277. æKY dspCLDeny
  278. æFc ADSP.h
  279. æT #define
  280. æD #define dspCLDeny 248 /* deny an open connection request */
  281. æC 
  282.  
  283. æKY dspStatus
  284. æFc ADSP.h
  285. æT #define
  286. æD #define dspStatus 247 /* get status of connection end */
  287. æC 
  288.  
  289. æKY dspRead
  290. æFc ADSP.h
  291. æT #define
  292. æD #define dspRead 246 /* read data from the connection */
  293. æC 
  294.  
  295. æKY dspWrite
  296. æFc ADSP.h
  297. æT #define
  298. æD #define dspWrite 245 /* write data on the connection */
  299. æC 
  300.  
  301. æKY dspAttention
  302. æFc ADSP.h
  303. æT #define
  304. æD #define dspAttention 244 /* send an attention message */
  305. æC 
  306.  
  307. æKY dspOptions
  308. æFc ADSP.h
  309. æT #define
  310. æD #define dspOptions 243 /* set connection end options */
  311. æC 
  312.  
  313. æKY dspReset
  314. æFc ADSP.h
  315. æT #define
  316. æD #define dspReset 242 /* forward reset the connection */
  317. æC 
  318.  
  319. æKY dspNewCID
  320. æFc ADSP.h
  321. æT #define
  322. æD #define dspNewCID 241 /* generate a cid for a connection end */
  323. æC 
  324.  
  325. æKY ocRequest
  326. æFc ADSP.h
  327. æT #define
  328. æD #define ocRequest 1 /* request a connection with remote */
  329. æC 
  330.  
  331. æKY ocPassive
  332. æFc ADSP.h
  333. æT #define
  334. æD #define ocPassive 2 /* wait for a connection request from remote */
  335. æC 
  336.  
  337. æKY ocAccept
  338. æFc ADSP.h
  339. æT #define
  340. æD #define ocAccept 3 /* accept request as delivered by listener */
  341. æC 
  342.  
  343. æKY ocEstablish
  344. æFc ADSP.h
  345. æT #define
  346. æD #define ocEstablish 4 /* consider connection to be open */
  347. æC 
  348.  
  349. æKY sListening
  350. æFc ADSP.h
  351. æT #define
  352. æD #define sListening 1 /* for connection listeners */
  353. æC 
  354.  
  355. æKY sPassive
  356. æFc ADSP.h
  357. æT #define
  358. æD #define sPassive 2 /* waiting for a connection request from remote */
  359. æC 
  360.  
  361. æKY sOpening
  362. æFc ADSP.h
  363. æT #define
  364. æD #define sOpening 3 /* requesting a connection with remote */
  365. æC 
  366.  
  367. æKY sOpen
  368. æFc ADSP.h
  369. æT #define
  370. æD #define sOpen 4 /* connection is open */
  371. æC 
  372.  
  373. æKY sClosing
  374. æFc ADSP.h
  375. æT #define
  376. æD #define sClosing 5 /* connection is being torn down */
  377. æC 
  378.  
  379. æKY sClosed
  380. æFc ADSP.h
  381. æT #define
  382. æD #define sClosed 6 /* connection end state is closed */
  383. æC 
  384.  
  385. æKY eClosed
  386. æFc ADSP.h
  387. æT #define
  388. æD #define eClosed 0x80 /* received connection closed advice */
  389. æC 
  390.  
  391. æKY eTearDown
  392. æFc ADSP.h
  393. æT #define
  394. æD #define eTearDown 0x40 /* connection closed due to broken connection */
  395. æC 
  396.  
  397. æKY eAttention
  398. æFc ADSP.h
  399. æT #define
  400. æD #define eAttention 0x20 /* received attention message */
  401. æC 
  402.  
  403. æKY eFwdReset
  404. æFc ADSP.h
  405. æT #define
  406. æD #define eFwdReset 0x10 /* received forward reset advice */
  407. æC 
  408.  
  409. æKY attnBufSize
  410. æFc ADSP.h
  411. æT #define
  412. æD #define attnBufSize 570 /* size of client attention buffer */
  413. æC 
  414.  
  415. æKY minDSPQueueSize
  416. æFc ADSP.h
  417. æT #define
  418. æD #define minDSPQueueSize 100 /* Minimum size of receive or send Queue */
  419. æC 
  420.  
  421. æKY TRCCB
  422. TPCCB
  423. æFc ADSP.h
  424. æT struct
  425. æD struct TRCCB {
  426.     unsigned char *ccbLink; /* link to next ccb */
  427.     unsigned short refNum; /* user reference number */
  428.     unsigned short state; /* state of the connection end */
  429.     unsigned char userFlags; /* flags for unsolicited connection events */
  430.     unsigned char localSocket; /* socket number of this connection end */
  431.     AddrBlock remoteAddress; /* internet address of remote end */
  432.     unsigned short attnCode; /* attention code received */
  433.     unsigned short attnSize; /* size of received attention data */
  434.     unsigned char *attnPtr; /* ptr to received attention data */
  435.     unsigned char reserved[220]; /* for adsp internal use */
  436. };
  437.  
  438. typedef struct TRCCB TRCCB;
  439. typedef TRCCB *TPCCB;
  440. æC 
  441.  
  442. æKY TRinitParams
  443. æFc ADSP.h
  444. æT struct
  445. æD struct TRinitParams {
  446.     TPCCB ccbPtr; /* pointer to connection control block */
  447.     ProcPtr userRoutine; /* client routine to call on event */
  448.     unsigned short sendQSize; /* size of send queue (0..64K bytes) */
  449.     unsigned char *sendQueue; /* client passed send queue buffer */
  450.     unsigned short recvQSize; /* size of receive queue (0..64K bytes) */
  451.     unsigned char *recvQueue; /* client passed receive queue buffer */
  452.     unsigned char *attnPtr; /* client passed receive attention buffer */
  453.     unsigned char localSocket; /* local socket number */
  454. };
  455.  
  456. typedef struct TRinitParams TRinitParams;
  457. æC 
  458.  
  459. æKY TRopenParams
  460. æFc ADSP.h
  461. æT struct
  462. æD struct TRopenParams {
  463.     unsigned short localCID; /* local connection id */
  464.     unsigned short remoteCID; /* remote connection id */
  465.     AddrBlock remoteAddress; /* address of remote end */
  466.     AddrBlock filterAddress; /* address filter */
  467.     unsigned long sendSeq; /* local send sequence number */
  468.     unsigned short sendWindow; /* send window size */
  469.     unsigned long recvSeq; /* receive sequence number */
  470.     unsigned long attnSendSeq; /* attention send sequence number */
  471.     unsigned long attnRecvSeq; /* attention receive sequence number */
  472.     unsigned char ocMode; /* open connection mode */
  473.     unsigned char ocInterval; /* open connection request retry interval */
  474.     unsigned char ocMaximum; /* open connection request retry maximum */
  475. };
  476.  
  477. typedef struct TRopenParams TRopenParams;
  478. æC 
  479.  
  480. æKY TRcloseParams
  481. æFc ADSP.h
  482. æT struct
  483. æD struct TRcloseParams {
  484.     unsigned char abort; /* abort connection immediately if non-zero */
  485. };
  486.  
  487. typedef struct TRcloseParams TRcloseParams;
  488. æC 
  489.  
  490. æKY TRstatusParams
  491. æFc ADSP.h
  492. æT struct
  493. æD struct TRstatusParams {
  494.     TPCCB ccbPtr; /* pointer to ccb */
  495.     unsigned short sendQPending; /* pending bytes in send queue */
  496.     unsigned short sendQFree; /* available buffer space in send queue */
  497.     unsigned short recvQPending; /* pending bytes in receive queue */
  498.     unsigned short recvQFree; /* available buffer space in receive queue */
  499. };
  500.  
  501. typedef struct TRstatusParams TRstatusParams;
  502. æC 
  503.  
  504. æKY TRioParams
  505. æFc ADSP.h
  506. æT struct
  507. æD struct TRioParams {
  508.     unsigned short reqCount; /* requested number of bytes */
  509.     unsigned short actCount; /* actual number of bytes */
  510.     unsigned char *dataPtr; /* pointer to data buffer */
  511.     unsigned char eom; /* indicates logical end of message */
  512.     unsigned char flush; /* send data now */
  513. };
  514.  
  515. typedef struct TRioParams TRioParams;
  516. æC 
  517.  
  518. æKY TRattnParams
  519. æFc ADSP.h
  520. æT struct
  521. æD struct TRattnParams {
  522.     unsigned short attnCode; /* client attention code */
  523.     unsigned short attnSize; /* size of attention data */
  524.     unsigned char *attnData; /* pointer to attention data */
  525.     unsigned char attnInterval; /* retransmit timer in 10-tick intervals */
  526. };
  527.  
  528. typedef struct TRattnParams TRattnParams;
  529. æC 
  530.  
  531. æKY TRoptionParams
  532. æFc ADSP.h
  533. æT struct
  534. æD struct TRoptionParams {
  535.     unsigned short sendBlocking; /* quantum for data packets */
  536.     unsigned char sendTimer; /* send timer in 10-tick intervals */
  537.     unsigned char rtmtTimer; /* retransmit timer in 10-tick intervals */
  538.     unsigned char badSeqMax; /* threshold for sending retransmit advice */
  539.     unsigned char useCheckSum; /* use ddp packet checksum */
  540. };
  541.  
  542. typedef struct TRoptionParams TRoptionParams;
  543. æC 
  544.  
  545. æKY TRnewcidParams
  546. æFc ADSP.h
  547. æT struct
  548. æD struct TRnewcidParams {
  549.     unsigned short newcid; /* new connection id returned */
  550. };
  551.  
  552. typedef struct TRnewcidParams TRnewcidParams;
  553. æC 
  554.  
  555. æKY DSPParamBlock
  556. DSPPBPtr
  557. æFc ADSP.h
  558. æT struct
  559. æD struct DSPParamBlock
  560.     {
  561.     struct            QElem *qLink;
  562.     short            qType;
  563.     short            ioTrap;
  564.     Ptr             ioCmdAddr;
  565.     ProcPtr         ioCompletion;
  566.     OSErr            ioResult;
  567.     char            *ioNamePtr;
  568.     short            ioVRefNum;
  569.     short            ioCRefNum;            /* adsp driver refNum */
  570.     short            csCode;             /* adsp driver control code */
  571.     long            qStatus;            /* adsp internal use */
  572.     short            ccbRefNum;            /* connection end refNum */
  573.     union
  574.         {
  575.         TRinitParams    initParams;     /* dspInit, dspCLInit */
  576.         TRopenParams    openParams;     /* dspOpen, dspCLListen, dspCLDeny */
  577.         TRcloseParams    closeParams;    /* dspClose, dspRemove */
  578.         TRioParams        ioParams;        /* dspRead, dspWrite */
  579.         TRattnParams    attnParams;     /* dspAttention */
  580.         TRstatusParams    statusParams;    /* dspStatus */
  581.         TRoptionParams    optionParams;    /* dspOptions */
  582.         TRnewcidParams    newCIDParams;    /* dspNewCID */
  583.         } u;
  584.     };
  585.  
  586. typedef struct DSPParamBlock DSPParamBlock;
  587. typedef struct DSPParamBlock *DSPPBPtr;
  588. æC 
  589.  
  590.  
  591. æKY AIFF.h
  592. æKL 
  593. ACE2to1Name
  594. ACE2Type
  595. ACE8to3Name
  596. ACE8Type
  597. AIFCID
  598. AIFCVersion1
  599. AIFFID
  600. AIFFLoop
  601. AnnotationID
  602. ApplicationSpecificChunk
  603. ApplicationSpecificChunkPtr
  604. ApplicationSpecificID
  605. AudioRecordingChunk
  606. AudioRecordingChunkPtr
  607. AudioRecordingID
  608. AuthorID
  609. ChunkHeader
  610. Comment
  611. CommentID
  612. CommentsChunk
  613. CommentsChunkPtr
  614. CommonChunk
  615. CommonChunkPtr
  616. CommonID
  617. ContainerChunk
  618. CopyrightID
  619. ExtCommonChunk
  620. ExtCommonChunkPtr
  621. FormatVersionChunk
  622. FormatVersionChunkPtr
  623. FormatVersionID
  624. FORMID
  625. ForwardBackwardLooping
  626. ForwardLooping
  627. ID
  628. InstrumentChunk
  629. InstrumentChunkPtr
  630. InstrumentID
  631. MACE3to1Name
  632. MACE3Type
  633. MACE6to1Name
  634. MACE6Type
  635. Marker
  636. MarkerChunk
  637. MarkerChunkPtr
  638. MarkerID
  639. MarkerIdType
  640. MIDIDataChunk
  641. MIDIDataChunkPtr
  642. MIDIDataID
  643. NameID
  644. NoLooping
  645. NoneName
  646. NoneType
  647. SoundDataChunk
  648. SoundDataChunkPtr
  649. SoundDataID
  650. TextChunk
  651. TextChunkPtr
  652.  
  653. æKY AIFFID
  654. æFc AIFF.h
  655. æT #define
  656. æD #define AIFFID 'AIFF'
  657. æC 
  658.  
  659. æKY AIFCID
  660. æFc AIFF.h
  661. æT #define
  662. æD #define AIFCID 'AIFC'
  663. æC 
  664.  
  665. æKY FormatVersionID
  666. æFc AIFF.h
  667. æT #define
  668. æD #define FormatVersionID 'FVER'
  669. æC 
  670.  
  671. æKY CommonID
  672. æFc AIFF.h
  673. æT #define
  674. æD #define CommonID 'COMM'
  675. æC 
  676.  
  677. æKY FORMID
  678. æFc AIFF.h
  679. æT #define
  680. æD #define FORMID 'FORM'
  681. æC 
  682.  
  683. æKY SoundDataID
  684. æFc AIFF.h
  685. æT #define
  686. æD #define SoundDataID 'SSND'
  687. æC 
  688.  
  689. æKY MarkerID
  690. æFc AIFF.h
  691. æT #define
  692. æD #define MarkerID 'MARK'
  693. æC 
  694.  
  695. æKY InstrumentID
  696. æFc AIFF.h
  697. æT #define
  698. æD #define InstrumentID 'INST'
  699. æC 
  700.  
  701. æKY MIDIDataID
  702. æFc AIFF.h
  703. æT #define
  704. æD #define MIDIDataID 'MIDI'
  705. æC 
  706.  
  707. æKY AudioRecordingID
  708. æFc AIFF.h
  709. æT #define
  710. æD #define AudioRecordingID 'AESD'
  711. æC 
  712.  
  713. æKY ApplicationSpecificID
  714. æFc AIFF.h
  715. æT #define
  716. æD #define ApplicationSpecificID 'APPL'
  717. æC 
  718.  
  719. æKY CommentID
  720. æFc AIFF.h
  721. æT #define
  722. æD #define CommentID 'COMT'
  723. æC 
  724.  
  725. æKY NameID
  726. æFc AIFF.h
  727. æT #define
  728. æD #define NameID 'NAME'
  729. æC 
  730.  
  731. æKY AuthorID
  732. æFc AIFF.h
  733. æT #define
  734. æD #define AuthorID 'AUTH'
  735. æC 
  736.  
  737. æKY CopyrightID
  738. æFc AIFF.h
  739. æT #define
  740. æD #define CopyrightID '(c)    '
  741. æC 
  742.  
  743. æKY AnnotationID
  744. æFc AIFF.h
  745. æT #define
  746. æD #define AnnotationID 'ANNO'
  747. æC 
  748.  
  749. æKY NoLooping
  750. æFc AIFF.h
  751. æT 
  752. æD     NoLooping = 0,
  753. æC 
  754.  
  755. æKY ForwardLooping
  756. æFc AIFF.h
  757. æT 
  758. æD     ForwardLooping = 1,
  759. æC 
  760.  
  761. æKY ForwardBackwardLooping
  762. æFc AIFF.h
  763. æT 
  764. æD     ForwardBackwardLooping = 2,
  765. æC 
  766.  
  767. æKY AIFCVersion1
  768. æFc AIFF.h
  769. æT 
  770. æD     AIFCVersion1 = 0xA2805140,
  771. æC 
  772.  
  773. æKY NoneName
  774. æFc AIFF.h
  775. æT #define
  776. æD #define NoneName "\pnot compressed"
  777. æC 
  778.  
  779. æKY ACE2to1Name
  780. æFc AIFF.h
  781. æT #define
  782. æD #define ACE2to1Name "\pACE 2-to-1"
  783. æC 
  784.  
  785. æKY ACE8to3Name
  786. æFc AIFF.h
  787. æT #define
  788. æD #define ACE8to3Name "\pACE 8-to-3"
  789. æC 
  790.  
  791. æKY MACE3to1Name
  792. æFc AIFF.h
  793. æT #define
  794. æD #define MACE3to1Name "\pMACE 3-to-1"
  795. æC 
  796.  
  797. æKY MACE6to1Name
  798. æFc AIFF.h
  799. æT #define
  800. æD #define MACE6to1Name "\pMACE 6-to-1"
  801. æC 
  802.  
  803. æKY NoneType
  804. æFc AIFF.h
  805. æT #define
  806. æD #define NoneType 'NONE'
  807. æC 
  808.  
  809. æKY ACE2Type
  810. æFc AIFF.h
  811. æT #define
  812. æD #define ACE2Type 'ACE2'
  813. æC 
  814.  
  815. æKY ACE8Type
  816. æFc AIFF.h
  817. æT #define
  818. æD #define ACE8Type 'ACE8'
  819. æC 
  820.  
  821. æKY MACE3Type
  822. æFc AIFF.h
  823. æT #define
  824. æD #define MACE3Type 'MAC3'
  825. æC 
  826.  
  827. æKY MACE6Type
  828. æFc AIFF.h
  829. æT #define
  830. æD #define MACE6Type 'MAC6'
  831. æC 
  832.  
  833. æKY ID
  834. æFc AIFF.h
  835. æT typedef
  836. æD typedef unsigned long ID;
  837. æC 
  838.  
  839. æKY MarkerIdType
  840. æFc AIFF.h
  841. æT typedef
  842. æD typedef short MarkerIdType;
  843. æC 
  844.  
  845. æKY ChunkHeader
  846. æFc AIFF.h
  847. æT struct
  848. æD struct ChunkHeader {
  849.     ID ckID;
  850.     long ckSize;
  851. };
  852.  
  853. typedef struct ChunkHeader ChunkHeader;
  854. æC 
  855.  
  856. æKY ContainerChunk
  857. æFc AIFF.h
  858. æT struct
  859. æD struct ContainerChunk {
  860.     ID ckID;
  861.     long ckSize;
  862.     ID formType;
  863. };
  864.  
  865. typedef struct ContainerChunk ContainerChunk;
  866. æC 
  867.  
  868. æKY FormatVersionChunk
  869. FormatVersionChunkPtr
  870. æFc AIFF.h
  871. æT struct
  872. æD struct FormatVersionChunk {
  873.     ID ckID;
  874.     long ckSize;
  875.     unsigned long timestamp;
  876. };
  877.  
  878. typedef struct FormatVersionChunk FormatVersionChunk;
  879. typedef FormatVersionChunk *FormatVersionChunkPtr;
  880. æC 
  881.  
  882. æKY CommonChunk
  883. CommonChunkPtr
  884. æFc AIFF.h
  885. æT struct
  886. æD struct CommonChunk {
  887.     ID ckID;
  888.     long ckSize;
  889.     short numChannels;
  890.     unsigned long numSampleFrames;
  891.     short sampleSize;
  892.     extended sampleRate;
  893. };
  894.  
  895. typedef struct CommonChunk CommonChunk;
  896. typedef CommonChunk *CommonChunkPtr;
  897. æC 
  898.  
  899. æKY ExtCommonChunk
  900. ExtCommonChunkPtr
  901. æFc AIFF.h
  902. æT struct
  903. æD struct ExtCommonChunk {
  904.     ID ckID;
  905.     long ckSize;
  906.     short numChannels;
  907.     unsigned long numSampleFrames;
  908.     short sampleSize;
  909.     extended sampleRate;
  910.     ID compressionType;
  911.     char compressionName[1];
  912. };
  913.  
  914. typedef struct ExtCommonChunk ExtCommonChunk;
  915. typedef ExtCommonChunk *ExtCommonChunkPtr;
  916. æC 
  917.  
  918. æKY SoundDataChunk
  919. SoundDataChunkPtr
  920. æFc AIFF.h
  921. æT struct
  922. æD struct SoundDataChunk {
  923.     ID ckID;
  924.     long ckSize;
  925.     unsigned long offset;
  926.     unsigned long blockSize;
  927. };
  928.  
  929. typedef struct SoundDataChunk SoundDataChunk;
  930. typedef SoundDataChunk *SoundDataChunkPtr;
  931. æC 
  932.  
  933. æKY Marker
  934. æFc AIFF.h
  935. æT struct
  936. æD struct Marker {
  937.     MarkerIdType id;
  938.     unsigned long position;
  939.     Str255 markerName;
  940. };
  941.  
  942. typedef struct Marker Marker;
  943. æC 
  944.  
  945. æKY MarkerChunk
  946. MarkerChunkPtr
  947. æFc AIFF.h
  948. æT struct
  949. æD struct MarkerChunk {
  950.     ID ckID;
  951.     long ckSize;
  952.     unsigned short numMarkers;
  953.     Marker Markers[1];
  954. };
  955.  
  956. typedef struct MarkerChunk MarkerChunk;
  957. typedef MarkerChunk *MarkerChunkPtr;
  958. æC 
  959.  
  960. æKY AIFFLoop
  961. æFc AIFF.h
  962. æT struct
  963. æD struct AIFFLoop {
  964.     short playMode;
  965.     MarkerIdType beginLoop;
  966.     MarkerIdType endLoop;
  967. };
  968.  
  969. typedef struct AIFFLoop AIFFLoop;
  970. æC 
  971.  
  972. æKY InstrumentChunk
  973. InstrumentChunkPtr
  974. æFc AIFF.h
  975. æT struct
  976. æD struct InstrumentChunk {
  977.     ID ckID;
  978.     long ckSize;
  979.     char baseFrequency;
  980.     char detune;
  981.     char lowFrequency;
  982.     char highFrequency;
  983.     char lowVelocity;
  984.     char highVelocity;
  985.     short gain;
  986.     AIFFLoop sustainLoop;
  987.     AIFFLoop releaseLoop;
  988. };
  989.  
  990. typedef struct InstrumentChunk InstrumentChunk;
  991. typedef InstrumentChunk *InstrumentChunkPtr;
  992. æC 
  993.  
  994. æKY MIDIDataChunk
  995. MIDIDataChunkPtr
  996. æFc AIFF.h
  997. æT struct
  998. æD struct MIDIDataChunk {
  999.     ID ckID;
  1000.     long ckSize;
  1001.     unsigned char MIDIdata[1];
  1002. };
  1003.  
  1004. typedef struct MIDIDataChunk MIDIDataChunk;
  1005. typedef MIDIDataChunk *MIDIDataChunkPtr;
  1006. æC 
  1007.  
  1008. æKY AudioRecordingChunk
  1009. AudioRecordingChunkPtr
  1010. æFc AIFF.h
  1011. æT struct
  1012. æD struct AudioRecordingChunk {
  1013.     ID ckID;
  1014.     long ckSize;
  1015.     unsigned char AESChannelStatus[24];
  1016. };
  1017.  
  1018. typedef struct AudioRecordingChunk AudioRecordingChunk;
  1019. typedef AudioRecordingChunk *AudioRecordingChunkPtr;
  1020. æC 
  1021.  
  1022. æKY ApplicationSpecificChunk
  1023. ApplicationSpecificChunkPtr
  1024. æFc AIFF.h
  1025. æT struct
  1026. æD struct ApplicationSpecificChunk {
  1027.     ID ckID;
  1028.     long ckSize;
  1029.     OSType applicationSignature;
  1030.     char data[1];
  1031. };
  1032.  
  1033. typedef struct ApplicationSpecificChunk ApplicationSpecificChunk;
  1034. typedef ApplicationSpecificChunk *ApplicationSpecificChunkPtr;
  1035. æC 
  1036.  
  1037. æKY Comment
  1038. æFc AIFF.h
  1039. æT struct
  1040. æD struct Comment {
  1041.     unsigned long timeStamp;
  1042.     MarkerIdType marker;
  1043.     unsigned short count;
  1044.     char text[1];
  1045. };
  1046.  
  1047. typedef struct Comment Comment;
  1048. æC 
  1049.  
  1050. æKY CommentsChunk
  1051. CommentsChunkPtr
  1052. æFc AIFF.h
  1053. æT struct
  1054. æD struct CommentsChunk {
  1055.     ID ckID;
  1056.     long ckSize;
  1057.     unsigned short numComments;
  1058.     Comment comments[1];
  1059. };
  1060.  
  1061. typedef struct CommentsChunk CommentsChunk;
  1062. typedef CommentsChunk *CommentsChunkPtr;
  1063. æC 
  1064.  
  1065. æKY TextChunk
  1066. TextChunkPtr
  1067. æFc AIFF.h
  1068. æT struct
  1069. æD struct TextChunk {
  1070.     ID ckID;
  1071.     long ckSize;
  1072.     char text[1];
  1073. };
  1074.  
  1075. typedef struct TextChunk TextChunk;
  1076. typedef TextChunk *TextChunkPtr;
  1077. æC 
  1078.  
  1079.  
  1080. æKY Aliases.h
  1081. æKL GetAliasInfo
  1082. MatchAlias
  1083. NewAlias
  1084. NewAliasMinimal
  1085. NewAliasMinimalFromFullPath
  1086. ResolveAlias
  1087. ResolveAliasFile
  1088. UpdateAlias
  1089.  
  1090. AliasFilterProcPtr
  1091. AliasHandle
  1092. AliasInfoType
  1093. AliasPtr
  1094. AliasRecord
  1095. asiAliasName
  1096. asiParentName
  1097. asiServerName
  1098. asiVolumeName
  1099. asiZoneName
  1100. kARMMountVol
  1101. kARMMultVols
  1102. kARMNoUI
  1103. kARMSearch
  1104. kARMSearchMore
  1105. kARMSearchRelFirst
  1106. rAliasType
  1107.  
  1108. æKY rAliasType
  1109. æFc Aliases.h
  1110. æT #define
  1111. æD #define rAliasType 'alis' /* Aliases are stored as resources of this type */
  1112. æC 
  1113.  
  1114. æKY kARMMountVol
  1115. æFc Aliases.h
  1116. æT 
  1117. æD     kARMMountVol = 0x00000001, /* mount the volume automatically */
  1118. æC 
  1119.  
  1120. æKY kARMNoUI
  1121. æFc Aliases.h
  1122. æT 
  1123. æD     kARMNoUI = 0x00000002, /* no user interface allowed during resolution */
  1124. æC 
  1125.  
  1126. æKY kARMMultVols
  1127. æFc Aliases.h
  1128. æT 
  1129. æD     kARMMultVols = 0x00000008, /* search on multiple volumes */
  1130. æC 
  1131.  
  1132. æKY kARMSearch
  1133. æFc Aliases.h
  1134. æT 
  1135. æD     kARMSearch = 0x00000100, /* search quickly */
  1136. æC 
  1137.  
  1138. æKY kARMSearchMore
  1139. æFc Aliases.h
  1140. æT 
  1141. æD     kARMSearchMore = 0x00000200, /* search further */
  1142. æC 
  1143.  
  1144. æKY kARMSearchRelFirst
  1145. æFc Aliases.h
  1146. æT 
  1147. æD     kARMSearchRelFirst = 0x00000400, /* search target on a relative path first */
  1148. æC 
  1149.  
  1150. æKY asiZoneName
  1151. æFc Aliases.h
  1152. æT 
  1153. æD     asiZoneName = -3, /* get zone name */
  1154. æC 
  1155.  
  1156. æKY asiServerName
  1157. æFc Aliases.h
  1158. æT 
  1159. æD     asiServerName = -2, /* get server name */
  1160. æC 
  1161.  
  1162. æKY asiVolumeName
  1163. æFc Aliases.h
  1164. æT 
  1165. æD     asiVolumeName = -1, /* get volume name */
  1166. æC 
  1167.  
  1168. æKY asiAliasName
  1169. æFc Aliases.h
  1170. æT 
  1171. æD     asiAliasName = 0, /* get aliased file/folder/volume name */
  1172. æC 
  1173.  
  1174. æKY asiParentName
  1175. æFc Aliases.h
  1176. æT 
  1177. æD     asiParentName = 1, /* get parent folder name */
  1178. æC 
  1179.  
  1180. æKY AliasRecord
  1181. AliasPtr
  1182. AliasHandle
  1183. æFc Aliases.h
  1184. æT struct
  1185. æD struct AliasRecord {
  1186.     OSType userType; /* appl stored type like creator type */
  1187.     unsigned short aliasSize; /* alias record size in bytes, for appl usage */
  1188. };
  1189.  
  1190. typedef struct AliasRecord AliasRecord;
  1191. typedef AliasRecord *AliasPtr, **AliasHandle;
  1192. æC 
  1193.  
  1194. æKY AliasInfoType
  1195. æFc Aliases.h
  1196. æT typedef
  1197. æD typedef short AliasInfoType; /* alias record information type */
  1198. æC 
  1199.  
  1200. æKY AliasFilterProcPtr
  1201. æFc Aliases.h
  1202. æT typedef
  1203. æD typedef pascal Boolean (*AliasFilterProcPtr) (CInfoPBPtr cpbPtr, /*I*/
  1204. Boolean *quitFlag, /*O*/
  1205. Ptr yourDataPtr); /*I*/
  1206. æC 
  1207.  
  1208. æKY NewAlias
  1209. æFc Aliases.h
  1210. æT Function
  1211. æTN A823
  1212. æD pascal OSErr NewAlias(const FSSpec *fromFile,
  1213.                       const FSSpec *target,
  1214.                       AliasHandle *alias)
  1215.     = {0x7002,0xA823}; 
  1216. æDT OSErr myVariable = NewAlias((const FSSpec *) fromFile,(
  1217.                       const FSSpec) * target,(
  1218.                       AliasHandle) * alias);
  1219. æC 
  1220.  
  1221. æKY NewAliasMinimal
  1222. æFc Aliases.h
  1223. æT Function
  1224. æTN A823
  1225. æD pascal OSErr NewAliasMinimal(const FSSpec *target,
  1226.                              AliasHandle *alias)
  1227.     = {0x7008,0xA823}; 
  1228. æDT OSErr myVariable = NewAliasMinimal((const FSSpec *) target,(
  1229.                              AliasHandle) * alias);
  1230. æC 
  1231.  
  1232. æKY NewAliasMinimalFromFullPath
  1233. æFc Aliases.h
  1234. æT Function
  1235. æTN A823
  1236. æD pascal OSErr NewAliasMinimalFromFullPath(short fullPathLength,
  1237.                                          const unsigned char *fullPath,
  1238.                                          ConstStr32Param zoneName,
  1239.                                          ConstStr31Param serverName,
  1240.                                          AliasHandle *alias)
  1241.     = {0x7009,0xA823}; 
  1242. #define NewAliasMinimalFromFullpath NewAliasMinimalFromFullPath
  1243.  
  1244. æDT OSErr myVariable = NewAliasMinimalFromFullPath((short) fullPathLength,(
  1245.                                          const unsigned char) * fullPath,()
  1246.                                          ConstStr32Param zoneName,()
  1247.                                          ConstStr31Param serverName,(
  1248.                                          AliasHandle) * alias);
  1249. æC 
  1250.  
  1251. æKY ResolveAlias
  1252. æFc Aliases.h
  1253. æT Function
  1254. æTN A823
  1255. æD pascal OSErr ResolveAlias(const FSSpec *fromFile,
  1256.                           AliasHandle alias,
  1257.                           FSSpec *target,
  1258.                           Boolean *wasChanged)
  1259.     = {0x7003,0xA823}; 
  1260. æDT OSErr myVariable = ResolveAlias((const FSSpec *) fromFile,()
  1261.                           AliasHandle alias,(
  1262.                           FSSpec) * target,(
  1263.                           Boolean) * wasChanged);
  1264. æC 
  1265.  
  1266. æKY GetAliasInfo
  1267. æFc Aliases.h
  1268. æT Function
  1269. æTN A823
  1270. æD pascal OSErr GetAliasInfo(const AliasHandle alias,
  1271.                           AliasInfoType index,
  1272.                           Str63 theString)
  1273.     = {0x7007,0xA823}; 
  1274. æDT OSErr myVariable = GetAliasInfo((const AliasHandle) alias,()
  1275.                           AliasInfoType index,()
  1276.                           Str63 theString);
  1277. æC 
  1278.  
  1279. æKY ResolveAliasFile
  1280. æFc Aliases.h
  1281. æT Function
  1282. æTN A823
  1283. æD pascal OSErr ResolveAliasFile(FSSpec *theSpec,
  1284.                               Boolean resolveAliasChains,
  1285.                               Boolean *targetIsFolder,
  1286.                               Boolean *wasAliased)
  1287.     = {0x700C,0xA823}; 
  1288. æDT OSErr myVariable = ResolveAliasFile((FSSpec *) theSpec,()
  1289.                               Boolean resolveAliasChains,(
  1290.                               Boolean) * targetIsFolder,(
  1291.                               Boolean) * wasAliased);
  1292. æC 
  1293.  
  1294. æKY MatchAlias
  1295. æFc Aliases.h
  1296. æT Function
  1297. æTN A823
  1298. æD pascal OSErr MatchAlias(const FSSpec *fromFile,
  1299.                         unsigned long rulesMask,
  1300.                         const AliasHandle alias,
  1301.                         short *aliasCount,
  1302.                         FSSpecArrayPtr aliasList,
  1303.                         Boolean *needsUpdate,
  1304.                         AliasFilterProcPtr aliasFilter,
  1305.                         void *yourDataPtr)
  1306.     = {0x7005,0xA823}; 
  1307. æDT OSErr myVariable = MatchAlias((const FSSpec *) fromFile,(
  1308.                         unsigned) long rulesMask,(
  1309.                         const) AliasHandle alias,(
  1310.                         short) * aliasCount,()
  1311.                         FSSpecArrayPtr aliasList,(
  1312.                         Boolean) * needsUpdate,()
  1313.                         AliasFilterProcPtr aliasFilter,(
  1314.                         void) * yourDataPtr);
  1315. æC 
  1316.  
  1317. æKY UpdateAlias
  1318. æFc Aliases.h
  1319. æT Function
  1320. æTN A823
  1321. æD pascal OSErr UpdateAlias(const FSSpec *fromFile,
  1322.                          const FSSpec *target,
  1323.                          AliasHandle alias,
  1324.                          Boolean *wasChanged)
  1325.     = {0x7006,0xA823}; 
  1326. æDT OSErr myVariable = UpdateAlias((const FSSpec *) fromFile,(
  1327.                          const FSSpec) * target,()
  1328.                          AliasHandle alias,(
  1329.                          Boolean) * wasChanged);
  1330. æC 
  1331.  
  1332.  
  1333. æKY AppleEvents.h
  1334. æKL AECoerceDesc
  1335. AECoercePtr
  1336. AECountItems
  1337. AECreateAppleEvent
  1338. AECreateDesc
  1339. AECreateList
  1340. AEDeleteItem
  1341. AEDeleteKeyDesc
  1342. AEDeleteParam
  1343. AEDisposeDesc
  1344. AEDuplicateDesc
  1345. AEGetArray
  1346. AEGetAttributeDesc
  1347. AEGetAttributePtr
  1348. AEGetCoercionHandler
  1349. AEGetEventHandler
  1350. AEGetInteractionAllowed
  1351. AEGetKeyDesc
  1352. AEGetKeyPtr
  1353. AEGetNthDesc
  1354. AEGetNthPtr
  1355. AEGetParamDesc
  1356. AEGetParamPtr
  1357. AEGetSpecialHandler
  1358. AEGetTheCurrentEvent
  1359. AEInstallCoercionHandler
  1360. AEInstallEventHandler
  1361. AEInstallSpecialHandler
  1362. AEInteractWithUser
  1363. AEProcessAppleEvent
  1364. AEPutArray
  1365. AEPutAttributeDesc
  1366. AEPutAttributePtr
  1367. AEPutDesc
  1368. AEPutKeyDesc
  1369. AEPutKeyPtr
  1370. AEPutParamDesc
  1371. AEPutParamPtr
  1372. AEPutPtr
  1373. AERemoveCoercionHandler
  1374. AERemoveEventHandler
  1375. AERemoveSpecialHandler
  1376. AEResetTimer
  1377. AEResumeTheCurrentEvent
  1378. AESend
  1379. AESetInteractionAllowed
  1380. AESetTheCurrentEvent
  1381. AESizeOfAttribute
  1382. AESizeOfKeyDesc
  1383. AESizeOfNthItem
  1384. AESizeOfParam
  1385. AESuspendTheCurrentEvent
  1386.  
  1387. AEAddressDesc
  1388. AEArrayData
  1389. AEArrayDataPointer
  1390. AEArrayType
  1391. AEDesc
  1392. AEDescList
  1393. AEEventClass
  1394. AEEventID
  1395. AEEventSource
  1396. AEInteractAllowed
  1397. AEKeyDesc
  1398. AEKeyword
  1399. AERecord
  1400. AESendMode
  1401. AESendPriority
  1402. AppleEvent
  1403. DescType
  1404. errAEBadListItem
  1405. errAECoercionFail
  1406. errAECorruptData
  1407. errAEDescNotFound
  1408. errAEEventNotHandled
  1409. errAEHandlerNotFound
  1410. errAEIllegalIndex
  1411. errAENewerVersion
  1412. errAENotAEDesc
  1413. errAENotAppleEvent
  1414. errAENotASpecialFunction
  1415. errAENoUserInteraction
  1416. errAEParamMissed
  1417. errAEReplyNotArrived
  1418. errAEReplyNotValid
  1419. errAETimeout
  1420. errAEUnknownAddressType
  1421. errAEUnknownSendMode
  1422. errAEWaitCanceled
  1423. errAEWrongDataType
  1424. EventFilterProcPtr
  1425. EventHandlerProcPtr
  1426. IdleProcPtr
  1427. kAEAlwaysInteract
  1428. kAEAnswer
  1429. kAEApplicationDied
  1430. kAECanInteract
  1431. kAECanSwitchLayer
  1432. kAECreatorType
  1433. kAEDataArray
  1434. kAEDefaultTimeout
  1435. kAEDescArray
  1436. kAEDirectCall
  1437. kAEDontReconnect
  1438. kAEHandleArray
  1439. kAEHighPriority
  1440. kAEInteractWithAll
  1441. kAEInteractWithLocal
  1442. kAEInteractWithSelf
  1443. kAEKeyDescArray
  1444. kAELocalProcess
  1445. kAENeverInteract
  1446. kAENoDispatch
  1447. kAENoReply
  1448. kAENormalPriority
  1449. kAEOpenApplication
  1450. kAEOpenDocuments
  1451. kAEPackedArray
  1452. kAEPrintDocuments
  1453. kAEQueueReply
  1454. kAEQuitAll
  1455. kAEQuitApplication
  1456. kAERemoteProcess
  1457. kAERestart
  1458. kAESameProcess
  1459. kAEShutDown
  1460. kAEUnknownSource
  1461. kAEUseStandardDispatch
  1462. kAEWaitReply
  1463. kAEWantReceipt
  1464. kAnyTransactionID
  1465. kAutoGenerateReturnID
  1466. kCoreEventClass
  1467. keyAddressAttr
  1468. keyDirectObject
  1469. keyErrorNumber
  1470. keyErrorString
  1471. keyEventClassAttr
  1472. keyEventIDAttr
  1473. keyEventSourceAttr
  1474. keyInteractLevelAttr
  1475. keyMissedKeywordAttr
  1476. keyOptionalKeywordAttr
  1477. keyPreDispatch
  1478. keyProcessSerialNumber
  1479. keyReturnIDAttr
  1480. keySelectProc
  1481. keyTimeoutAttr
  1482. keyTransactionIDAttr
  1483. kNoTimeOut
  1484. typeAEList
  1485. typeAERecord
  1486. typeAlias
  1487. typeApplSignature
  1488. typeAppParameters
  1489. typeBoolean
  1490. typeChar
  1491. typeComp
  1492. typeEnumerated
  1493. typeExtended
  1494. typeFalse
  1495. typeFloat
  1496. typeFSS
  1497. typeInteger
  1498. typeKeyword
  1499. typeLongFloat
  1500. typeLongInteger
  1501. typeMagnitude
  1502. typeNull
  1503. typeProcessSerialNumber
  1504. typeProperty
  1505. typeSectionH
  1506. typeSessionID
  1507. typeShortFloat
  1508. typeShortInteger
  1509. typeSMFloat
  1510. typeSMInt
  1511. typeTargetID
  1512. typeTrue
  1513. typeType
  1514. typeWildCard
  1515.  
  1516. æKY typeBoolean
  1517. æFc AppleEvents.h
  1518. æT #define
  1519. æD #define typeBoolean 'bool'
  1520. æC 
  1521.  
  1522. æKY typeChar
  1523. æFc AppleEvents.h
  1524. æT #define
  1525. æD #define typeChar 'TEXT'
  1526. æC 
  1527.  
  1528. æKY typeSMInt
  1529. æFc AppleEvents.h
  1530. æT #define
  1531. æD #define typeSMInt 'shor'
  1532. æC 
  1533.  
  1534. æKY typeInteger
  1535. æFc AppleEvents.h
  1536. æT #define
  1537. æD #define typeInteger 'long'
  1538. æC 
  1539.  
  1540. æKY typeSMFloat
  1541. æFc AppleEvents.h
  1542. æT #define
  1543. æD #define typeSMFloat 'sing'
  1544. æC 
  1545.  
  1546. æKY typeFloat
  1547. æFc AppleEvents.h
  1548. æT #define
  1549. æD #define typeFloat 'doub'
  1550. æC 
  1551.  
  1552. æKY typeLongInteger
  1553. æFc AppleEvents.h
  1554. æT #define
  1555. æD #define typeLongInteger 'long'
  1556. æC 
  1557.  
  1558. æKY typeShortInteger
  1559. æFc AppleEvents.h
  1560. æT #define
  1561. æD #define typeShortInteger 'shor'
  1562. æC 
  1563.  
  1564. æKY typeLongFloat
  1565. æFc AppleEvents.h
  1566. æT #define
  1567. æD #define typeLongFloat 'doub'
  1568. æC 
  1569.  
  1570. æKY typeShortFloat
  1571. æFc AppleEvents.h
  1572. æT #define
  1573. æD #define typeShortFloat 'sing'
  1574. æC 
  1575.  
  1576. æKY typeExtended
  1577. æFc AppleEvents.h
  1578. æT #define
  1579. æD #define typeExtended 'exte'
  1580. æC 
  1581.  
  1582. æKY typeComp
  1583. æFc AppleEvents.h
  1584. æT #define
  1585. æD #define typeComp 'comp'
  1586. æC 
  1587.  
  1588. æKY typeMagnitude
  1589. æFc AppleEvents.h
  1590. æT #define
  1591. æD #define typeMagnitude 'magn'
  1592. æC 
  1593.  
  1594. æKY typeAEList
  1595. æFc AppleEvents.h
  1596. æT #define
  1597. æD #define typeAEList 'list'
  1598. æC 
  1599.  
  1600. æKY typeAERecord
  1601. æFc AppleEvents.h
  1602. æT #define
  1603. æD #define typeAERecord 'reco'
  1604. æC 
  1605.  
  1606. æKY typeTrue
  1607. æFc AppleEvents.h
  1608. æT #define
  1609. æD #define typeTrue 'true'
  1610. æC 
  1611.  
  1612. æKY typeFalse
  1613. æFc AppleEvents.h
  1614. æT #define
  1615. æD #define typeFalse 'fals'
  1616. æC 
  1617.  
  1618. æKY typeAlias
  1619. æFc AppleEvents.h
  1620. æT #define
  1621. æD #define typeAlias 'alis'
  1622. æC 
  1623.  
  1624. æKY typeEnumerated
  1625. æFc AppleEvents.h
  1626. æT #define
  1627. æD #define typeEnumerated 'enum'
  1628. æC 
  1629.  
  1630. æKY typeType
  1631. æFc AppleEvents.h
  1632. æT #define
  1633. æD #define typeType 'type'
  1634. æC 
  1635.  
  1636. æKY typeAppParameters
  1637. æFc AppleEvents.h
  1638. æT #define
  1639. æD #define typeAppParameters 'appa'
  1640. æC 
  1641.  
  1642. æKY typeProperty
  1643. æFc AppleEvents.h
  1644. æT #define
  1645. æD #define typeProperty 'prop'
  1646. æC 
  1647.  
  1648. æKY typeFSS
  1649. æFc AppleEvents.h
  1650. æT #define
  1651. æD #define typeFSS 'fss '
  1652. æC 
  1653.  
  1654. æKY typeKeyword
  1655. æFc AppleEvents.h
  1656. æT #define
  1657. æD #define typeKeyword 'keyw'
  1658. æC 
  1659.  
  1660. æKY typeSectionH
  1661. æFc AppleEvents.h
  1662. æT #define
  1663. æD #define typeSectionH 'sect'
  1664. æC 
  1665.  
  1666. æKY typeWildCard
  1667. æFc AppleEvents.h
  1668. æT #define
  1669. æD #define typeWildCard '****'
  1670. æC 
  1671.  
  1672. æKY typeApplSignature
  1673. æFc AppleEvents.h
  1674. æT #define
  1675. æD #define typeApplSignature 'sign'
  1676. æC 
  1677.  
  1678. æKY typeSessionID
  1679. æFc AppleEvents.h
  1680. æT #define
  1681. æD #define typeSessionID 'ssid'
  1682. æC 
  1683.  
  1684. æKY typeTargetID
  1685. æFc AppleEvents.h
  1686. æT #define
  1687. æD #define typeTargetID 'targ'
  1688. æC 
  1689.  
  1690. æKY typeProcessSerialNumber
  1691. æFc AppleEvents.h
  1692. æT #define
  1693. æD #define typeProcessSerialNumber 'psn '
  1694. æC 
  1695.  
  1696. æKY typeNull
  1697. æFc AppleEvents.h
  1698. æT #define
  1699. æD #define typeNull 'null' /*the type of null/nonexistent data*/
  1700. æC 
  1701.  
  1702. æKY kCoreEventClass
  1703. æFc AppleEvents.h
  1704. æT #define
  1705. æD #define kCoreEventClass 'aevt'
  1706. æC 
  1707.  
  1708. æKY kAEOpenApplication
  1709. æFc AppleEvents.h
  1710. æT #define
  1711. æD #define kAEOpenApplication 'oapp'
  1712. æC 
  1713.  
  1714. æKY kAEOpenDocuments
  1715. æFc AppleEvents.h
  1716. æT #define
  1717. æD #define kAEOpenDocuments 'odoc'
  1718. æC 
  1719.  
  1720. æKY kAEPrintDocuments
  1721. æFc AppleEvents.h
  1722. æT #define
  1723. æD #define kAEPrintDocuments 'pdoc'
  1724. æC 
  1725.  
  1726. æKY kAEQuitApplication
  1727. æFc AppleEvents.h
  1728. æT #define
  1729. æD #define kAEQuitApplication 'quit'
  1730. æC 
  1731.  
  1732. æKY kAECreatorType
  1733. æFc AppleEvents.h
  1734. æT #define
  1735. æD #define kAECreatorType 'crea'
  1736. æC 
  1737.  
  1738. æKY kAEQuitAll
  1739. æFc AppleEvents.h
  1740. æT #define
  1741. æD #define kAEQuitAll 'quia'
  1742. æC 
  1743.  
  1744. æKY kAEShutDown
  1745. æFc AppleEvents.h
  1746. æT #define
  1747. æD #define kAEShutDown 'shut'
  1748. æC 
  1749.  
  1750. æKY kAERestart
  1751. æFc AppleEvents.h
  1752. æT #define
  1753. æD #define kAERestart 'rest'
  1754. æC 
  1755.  
  1756. æKY kAEApplicationDied
  1757. æFc AppleEvents.h
  1758. æT #define
  1759. æD #define kAEApplicationDied 'obit'
  1760. æC 
  1761.  
  1762. æKY keyProcessSerialNumber
  1763. æFc AppleEvents.h
  1764. æT #define
  1765. æD #define keyProcessSerialNumber 'psn '
  1766. æC 
  1767.  
  1768. æKY keyErrorNumber
  1769. æFc AppleEvents.h
  1770. æT #define
  1771. æD #define keyErrorNumber 'errn'
  1772. æC 
  1773.  
  1774. æKY keyErrorString
  1775. æFc AppleEvents.h
  1776. æT #define
  1777. æD #define keyErrorString 'errs'
  1778. æC 
  1779.  
  1780. æKY kAEAnswer
  1781. æFc AppleEvents.h
  1782. æT #define
  1783. æD #define kAEAnswer 'ansr'
  1784. æC 
  1785.  
  1786. æKY keyDirectObject
  1787. æFc AppleEvents.h
  1788. æT #define
  1789. æD #define keyDirectObject '----'
  1790. æC 
  1791.  
  1792. æKY keyPreDispatch
  1793. æFc AppleEvents.h
  1794. æT #define
  1795. æD #define keyPreDispatch 'phac' /* PreHandler Accessor Call */
  1796. æC 
  1797.  
  1798. æKY keySelectProc
  1799. æFc AppleEvents.h
  1800. æT #define
  1801. æD #define keySelectProc 'selh' /* More selector Call */
  1802. æC 
  1803.  
  1804. æKY keyTransactionIDAttr
  1805. æFc AppleEvents.h
  1806. æT #define
  1807. æD #define keyTransactionIDAttr 'tran'
  1808. æC 
  1809.  
  1810. æKY keyReturnIDAttr
  1811. æFc AppleEvents.h
  1812. æT #define
  1813. æD #define keyReturnIDAttr 'rtid'
  1814. æC 
  1815.  
  1816. æKY keyEventClassAttr
  1817. æFc AppleEvents.h
  1818. æT #define
  1819. æD #define keyEventClassAttr 'evcl'
  1820. æC 
  1821.  
  1822. æKY keyEventIDAttr
  1823. æFc AppleEvents.h
  1824. æT #define
  1825. æD #define keyEventIDAttr 'evid'
  1826. æC 
  1827.  
  1828. æKY keyAddressAttr
  1829. æFc AppleEvents.h
  1830. æT #define
  1831. æD #define keyAddressAttr 'addr'
  1832. æC 
  1833.  
  1834. æKY keyOptionalKeywordAttr
  1835. æFc AppleEvents.h
  1836. æT #define
  1837. æD #define keyOptionalKeywordAttr 'optk'
  1838. æC 
  1839.  
  1840. æKY keyTimeoutAttr
  1841. æFc AppleEvents.h
  1842. æT #define
  1843. æD #define keyTimeoutAttr 'timo'
  1844. æC 
  1845.  
  1846. æKY keyInteractLevelAttr
  1847. æFc AppleEvents.h
  1848. æT #define
  1849. æD #define keyInteractLevelAttr 'inte' /*this attribute is read only will be set in AESend*/
  1850. æC 
  1851.  
  1852. æKY keyEventSourceAttr
  1853. æFc AppleEvents.h
  1854. æT #define
  1855. æD #define keyEventSourceAttr 'esrc' /* this attribute is read only */
  1856. æC 
  1857.  
  1858. æKY keyMissedKeywordAttr
  1859. æFc AppleEvents.h
  1860. æT #define
  1861. æD #define keyMissedKeywordAttr 'miss' /* this attribute is read only */
  1862. æC 
  1863.  
  1864. æKY kAENoReply
  1865. æFc AppleEvents.h
  1866. æT 
  1867. æD     kAENoReply = 0x00000001, /* Sender doesn't want a reply to event */
  1868. æC 
  1869.  
  1870. æKY kAEQueueReply
  1871. æFc AppleEvents.h
  1872. æT 
  1873. æD     kAEQueueReply = 0x00000002, /* Sender wants a reply but won't wait */
  1874. æC 
  1875.  
  1876. æKY kAEWaitReply
  1877. æFc AppleEvents.h
  1878. æT 
  1879. æD     kAEWaitReply = 0x00000003, /* Sender wants a reply and will be waiting */
  1880. æC 
  1881.  
  1882. æKY kAENeverInteract
  1883. æFc AppleEvents.h
  1884. æT 
  1885. æD     kAENeverInteract = 0x00000010, /* Server should not interact with user */
  1886. æC 
  1887.  
  1888. æKY kAECanInteract
  1889. æFc AppleEvents.h
  1890. æT 
  1891. æD     kAECanInteract = 0x00000020, /* Server may try to interact with user */
  1892. æC 
  1893.  
  1894. æKY kAEAlwaysInteract
  1895. æFc AppleEvents.h
  1896. æT 
  1897. æD     kAEAlwaysInteract = 0x00000030, /* Server should always interact with user where appropriate */
  1898. æC 
  1899.  
  1900. æKY kAECanSwitchLayer
  1901. æFc AppleEvents.h
  1902. æT 
  1903. æD     kAECanSwitchLayer = 0x00000040, /* Interaction may switch layer */
  1904. æC 
  1905.  
  1906. æKY kAEDontReconnect
  1907. æFc AppleEvents.h
  1908. æT 
  1909. æD     kAEDontReconnect = 0x00000080, /* don't reconnect if there is a sessClosedErr from PPCToolbox */
  1910. æC 
  1911.  
  1912. æKY kAEWantReceipt
  1913. æFc AppleEvents.h
  1914. æT #define
  1915. æD #define kAEWantReceipt nReturnReceipt /* Send wants a receipt of message */
  1916. æC 
  1917.  
  1918. æKY kAENormalPriority
  1919. æFc AppleEvents.h
  1920. æT 
  1921. æD     kAENormalPriority = 0x00000000, /* Post message at the end of event queue */
  1922. æC 
  1923.  
  1924. æKY kAEHighPriority
  1925. æFc AppleEvents.h
  1926. æT #define
  1927. æD #define kAEHighPriority nAttnMsg /* Post message at the front of the event queue */
  1928. æC 
  1929.  
  1930. æKY kAnyTransactionID
  1931. æFc AppleEvents.h
  1932. æT 
  1933. æD     kAnyTransactionID = 0, /* no transaction is in use */
  1934. æC 
  1935.  
  1936. æKY kAutoGenerateReturnID
  1937. æFc AppleEvents.h
  1938. æT 
  1939. æD     kAutoGenerateReturnID = -1, /* AECreateAppleEvent will generate a session-unique ID */
  1940. æC 
  1941.  
  1942. æKY kAEDefaultTimeout
  1943. æFc AppleEvents.h
  1944. æT 
  1945. æD     kAEDefaultTimeout = -1, /* timeout value determined by AEM */
  1946. æC 
  1947.  
  1948. æKY kNoTimeOut
  1949. æFc AppleEvents.h
  1950. æT 
  1951. æD     kNoTimeOut = -2, /* wait until reply comes back, however long it takes */
  1952. æC 
  1953.  
  1954. æKY kAENoDispatch
  1955. æFc AppleEvents.h
  1956. æT 
  1957. æD     kAENoDispatch = 0,
  1958. æC 
  1959.  
  1960. æKY kAEUseStandardDispatch
  1961. æFc AppleEvents.h
  1962. æT 
  1963. æD     kAEUseStandardDispatch = -1,
  1964. æC 
  1965.  
  1966. æKY errAECoercionFail
  1967. æFc AppleEvents.h
  1968. æT 
  1969. æD     errAECoercionFail = -1700,
  1970. æC 
  1971.  
  1972. æKY errAEDescNotFound
  1973. æFc AppleEvents.h
  1974. æT 
  1975. æD     errAEDescNotFound = -1701,
  1976. æC 
  1977.  
  1978. æKY errAECorruptData
  1979. æFc AppleEvents.h
  1980. æT 
  1981. æD     errAECorruptData = -1702,
  1982. æC 
  1983.  
  1984. æKY errAEWrongDataType
  1985. æFc AppleEvents.h
  1986. æT 
  1987. æD     errAEWrongDataType = -1703,
  1988. æC 
  1989.  
  1990. æKY errAENotAEDesc
  1991. æFc AppleEvents.h
  1992. æT 
  1993. æD     errAENotAEDesc = -1704,
  1994. æC 
  1995.  
  1996. æKY errAEBadListItem
  1997. æFc AppleEvents.h
  1998. æT 
  1999. æD     errAEBadListItem = -1705, /* Specified list item does not exist */
  2000. æC 
  2001.  
  2002. æKY errAENewerVersion
  2003. æFc AppleEvents.h
  2004. æT 
  2005. æD     errAENewerVersion = -1706, /* Need newer version of AppleEvent Manager */
  2006. æC 
  2007.  
  2008. æKY errAENotAppleEvent
  2009. æFc AppleEvents.h
  2010. æT 
  2011. æD     errAENotAppleEvent = -1707, /* The event is not in AppleEvent format */
  2012. æC 
  2013.  
  2014. æKY errAEEventNotHandled
  2015. æFc AppleEvents.h
  2016. æT 
  2017. æD     errAEEventNotHandled = -1708, /* The AppleEvent was not handled by any handler */
  2018. æC 
  2019.  
  2020. æKY errAEReplyNotValid
  2021. æFc AppleEvents.h
  2022. æT 
  2023. æD     errAEReplyNotValid = -1709, /* AEResetTimer was passed an invalid reply parameter */
  2024. æC 
  2025.  
  2026. æKY errAEUnknownSendMode
  2027. æFc AppleEvents.h
  2028. æT 
  2029. æD     errAEUnknownSendMode = -1710, /* Mode wasn't NoReply, WaitReply, or QueueReply;     or Interaction level is unknown */
  2030. æC 
  2031.  
  2032. æKY errAEWaitCanceled
  2033. æFc AppleEvents.h
  2034. æT 
  2035. æD     errAEWaitCanceled = -1711, /* In AESend, User cancelled out of wait loop for  reply or receipt */
  2036. æC 
  2037.  
  2038. æKY errAETimeout
  2039. æFc AppleEvents.h
  2040. æT 
  2041. æD     errAETimeout = -1712, /* AppleEvent timed out */
  2042. æC 
  2043.  
  2044. æKY errAENoUserInteraction
  2045. æFc AppleEvents.h
  2046. æT 
  2047. æD     errAENoUserInteraction = -1713, /* no user interaction allowed */
  2048. æC 
  2049.  
  2050. æKY errAENotASpecialFunction
  2051. æFc AppleEvents.h
  2052. æT 
  2053. æD     errAENotASpecialFunction = -1714, /* there is no special function with this keyword */
  2054. æC 
  2055.  
  2056. æKY errAEParamMissed
  2057. æFc AppleEvents.h
  2058. æT 
  2059. æD     errAEParamMissed = -1715, /* a required parameter was not accessed */
  2060. æC 
  2061.  
  2062. æKY errAEUnknownAddressType
  2063. æFc AppleEvents.h
  2064. æT 
  2065. æD     errAEUnknownAddressType = -1716, /* The target address type is not known */
  2066. æC 
  2067.  
  2068. æKY errAEHandlerNotFound
  2069. æFc AppleEvents.h
  2070. æT 
  2071. æD     errAEHandlerNotFound = -1717, /* No handler in the dispatch tables fits the parameters to
  2072.                                               AEGetEventHandler or AEGetCoercionHandler */
  2073. æC 
  2074.  
  2075. æKY errAEReplyNotArrived
  2076. æFc AppleEvents.h
  2077. æT 
  2078. æD     errAEReplyNotArrived = -1718, /* the contents of the reply you are accessing have not arrived yet */
  2079. æC 
  2080.  
  2081. æKY errAEIllegalIndex
  2082. æFc AppleEvents.h
  2083. æT 
  2084. æD     errAEIllegalIndex = -1719, /* Index is out of range in a put operation */
  2085. æC 
  2086.  
  2087. æKY AEKeyword
  2088. æFc AppleEvents.h
  2089. æT typedef
  2090. æD typedef unsigned long AEKeyword;
  2091. æC 
  2092.  
  2093. æKY AEEventClass
  2094. æFc AppleEvents.h
  2095. æT typedef
  2096. æD typedef unsigned long AEEventClass;
  2097. æC 
  2098.  
  2099. æKY AEEventID
  2100. æFc AppleEvents.h
  2101. æT typedef
  2102. æD typedef unsigned long AEEventID;
  2103. æC 
  2104.  
  2105. æKY DescType
  2106. æFc AppleEvents.h
  2107. æT typedef
  2108. æD typedef ResType DescType;
  2109. æC 
  2110.  
  2111. æKY AEDesc
  2112. æFc AppleEvents.h
  2113. æT struct
  2114. æD struct AEDesc {
  2115.     DescType descriptorType;
  2116.     Handle dataHandle;
  2117. };
  2118.  
  2119. typedef struct AEDesc AEDesc;
  2120. æC 
  2121.  
  2122. æKY AEAddressDesc
  2123. æFc AppleEvents.h
  2124. æT typedef
  2125. æD typedef AEDesc AEAddressDesc; /* an AEDesc which contains addressing data */
  2126. æC 
  2127.  
  2128. æKY AEDescList
  2129. æFc AppleEvents.h
  2130. æT typedef
  2131. æD typedef AEDesc AEDescList; /* a list of AEDesc is a special kind of AEDesc */
  2132. æC 
  2133.  
  2134. æKY AERecord
  2135. æFc AppleEvents.h
  2136. æT typedef
  2137. æD typedef AEDescList AERecord; /* AERecord is a list of keyworded AEDesc */
  2138. æC 
  2139.  
  2140. æKY AppleEvent
  2141. æFc AppleEvents.h
  2142. æT typedef
  2143. æD typedef AERecord AppleEvent; /* an AERecord that contains an AppleEvent */
  2144. æC 
  2145.  
  2146. æKY AESendMode
  2147. æFc AppleEvents.h
  2148. æT typedef
  2149. æD typedef long AESendMode; /* Type of parameter to AESend */
  2150. æC 
  2151.  
  2152. æKY AESendPriority
  2153. æFc AppleEvents.h
  2154. æT typedef
  2155. æD typedef short AESendPriority; /* Type of priority param of AESend */
  2156. æC 
  2157.  
  2158. æKY AEInteractAllowed
  2159. kAEInteractWithSelf
  2160. kAEInteractWithLocal
  2161. kAEInteractWithAll
  2162.  
  2163. æFc AppleEvents.h
  2164. æT enum
  2165. æD enum {kAEInteractWithSelf,kAEInteractWithLocal,kAEInteractWithAll};
  2166. typedef unsigned char AEInteractAllowed;
  2167. æC 
  2168.  
  2169. æKY AEEventSource
  2170. kAEUnknownSource
  2171. kAEDirectCall
  2172. kAESameProcess
  2173. kAELocalProcess
  2174. kAERemoteProcess
  2175. æFc AppleEvents.h
  2176. æT enum
  2177. æD enum {kAEUnknownSource,kAEDirectCall,kAESameProcess,kAELocalProcess,kAERemoteProcess};
  2178. typedef unsigned char AEEventSource;
  2179. æC 
  2180.  
  2181. æKY AEKeyDesc
  2182. æFc AppleEvents.h
  2183. æT struct
  2184. æD struct AEKeyDesc {
  2185.     AEKeyword descKey;
  2186.     AEDesc descContent;
  2187. };
  2188.  
  2189. typedef struct AEKeyDesc AEKeyDesc;
  2190. æC 
  2191.  
  2192. æKY AEArrayType
  2193. kAEDataArray
  2194. kAEPackedArray
  2195. kAEHandleArray
  2196. kAEDescArray
  2197. kAEKeyDescArray
  2198. æFc AppleEvents.h
  2199. æT enum
  2200. æD enum {kAEDataArray,kAEPackedArray,kAEHandleArray,kAEDescArray,kAEKeyDescArray};
  2201. typedef unsigned char AEArrayType;
  2202. æC 
  2203.  
  2204. æKY AEArrayData
  2205. AEArrayDataPointer
  2206. æFc AppleEvents.h
  2207. æT struct
  2208. æD union AEArrayData {
  2209.     short AEDataArray[1];
  2210.     char AEPackedArray[1];
  2211.     Handle AEHandleArray[1];
  2212.     AEDesc AEDescArray[1];
  2213.     AEKeyDesc AEKeyDescArray[1];
  2214. };
  2215.  
  2216. typedef union AEArrayData AEArrayData;
  2217. typedef AEArrayData *AEArrayDataPointer;
  2218. æC 
  2219.  
  2220. æKY EventHandlerProcPtr
  2221. æFc AppleEvents.h
  2222. æT typedef
  2223. æD typedef ProcPtr EventHandlerProcPtr;
  2224. æC 
  2225.  
  2226. æKY IdleProcPtr
  2227. æFc AppleEvents.h
  2228. æT typedef
  2229. æD typedef ProcPtr IdleProcPtr;
  2230. æC 
  2231.  
  2232. æKY EventFilterProcPtr
  2233. æFc AppleEvents.h
  2234. æT typedef
  2235. æD typedef ProcPtr EventFilterProcPtr;
  2236. æC 
  2237.  
  2238. æKY AECreateDesc
  2239. æFc AppleEvents.h
  2240. æT Function
  2241. æD pascal OSErr AECreateDesc(DescType typeCode,
  2242.                           Ptr dataPtr,
  2243.                           Size dataSize,
  2244.                           AEDesc *result)
  2245.     = {0x303C,0x0825,0xA816}; 
  2246. æDT OSErr myVariable = AECreateDesc((DescType) typeCode,()
  2247.                           Ptr dataPtr,()
  2248.                           Size dataSize,(
  2249.                           AEDesc) * result);
  2250. æC 
  2251.  
  2252. æKY AECoercePtr
  2253. æFc AppleEvents.h
  2254. æT Function
  2255. æD pascal OSErr AECoercePtr(DescType typeCode,
  2256.                          Ptr dataPtr,
  2257.                          Size dataSize,
  2258.                          DescType toType,
  2259.                          AEDesc *result)
  2260.     = {0x303C,0x0A02,0xA816}; 
  2261. æDT OSErr myVariable = AECoercePtr((DescType) typeCode,()
  2262.                          Ptr dataPtr,()
  2263.                          Size dataSize,()
  2264.                          DescType toType,(
  2265.                          AEDesc) * result);
  2266. æC 
  2267.  
  2268. æKY AECoerceDesc
  2269. æFc AppleEvents.h
  2270. æT Function
  2271. æD pascal OSErr AECoerceDesc(AEDesc theAEDesc,
  2272.                           DescType toType,
  2273.                           AEDesc *result)
  2274.     = {0x303C,0x0603,0xA816}; 
  2275. æDT OSErr myVariable = AECoerceDesc((AEDesc) theAEDesc,()
  2276.                           DescType toType,(
  2277.                           AEDesc) * result);
  2278. æC 
  2279.  
  2280. æKY AEDisposeDesc
  2281. æFc AppleEvents.h
  2282. æT Function
  2283. æD pascal OSErr AEDisposeDesc(AEDesc *theAEDesc)
  2284.     = {0x303C,0x0204,0xA816}; 
  2285. æDT OSErr myVariable = AEDisposeDesc((AEDesc *) theAEDesc);
  2286. æC 
  2287.  
  2288. æKY AEDuplicateDesc
  2289. æFc AppleEvents.h
  2290. æT Function
  2291. æD pascal OSErr AEDuplicateDesc(AEDesc theAEDesc,AEDesc *result)
  2292.     = {0x303C,0x0405,0xA816}; 
  2293. æDT OSErr myVariable = AEDuplicateDesc((AEDesc) theAEDesc,(AEDesc *) result);
  2294. æC 
  2295.  
  2296. æKY AECreateList
  2297. æFc AppleEvents.h
  2298. æT Function
  2299. æD pascal OSErr AECreateList(Ptr factoringPtr,
  2300.                           Size factoredSize,
  2301.                           Boolean isRecord,
  2302.                           AEDescList *resultList)
  2303.     = {0x303C,0x0706,0xA816}; 
  2304. æDT OSErr myVariable = AECreateList((Ptr) factoringPtr,()
  2305.                           Size factoredSize,()
  2306.                           Boolean isRecord,(
  2307.                           AEDescList) * resultList);
  2308. æC 
  2309.  
  2310. æKY AECountItems
  2311. æFc AppleEvents.h
  2312. æT Function
  2313. æD pascal OSErr AECountItems(AEDescList theAEDescList,
  2314.                           long *theCount)
  2315.     = {0x303C,0x0407,0xA816}; 
  2316. æDT OSErr myVariable = AECountItems((AEDescList) theAEDescList,(
  2317.                           long) * theCount);
  2318. æC 
  2319.  
  2320. æKY AEPutPtr
  2321. æFc AppleEvents.h
  2322. æT Function
  2323. æD pascal OSErr AEPutPtr(AEDescList theAEDescList,
  2324.                       long index,
  2325.                       DescType typeCode,
  2326.                       Ptr dataPtr,
  2327.                       Size dataSize)
  2328.     = {0x303C,0x0A08,0xA816}; 
  2329. æDT OSErr myVariable = AEPutPtr((AEDescList) theAEDescList,()
  2330.                       long index,()
  2331.                       DescType typeCode,()
  2332.                       Ptr dataPtr,()
  2333.                       Size dataSize);
  2334. æC 
  2335.  
  2336. æKY AEPutDesc
  2337. æFc AppleEvents.h
  2338. æT Function
  2339. æD pascal OSErr AEPutDesc(AEDescList theAEDescList,
  2340.                        long index,
  2341.                        AEDesc theAEDesc)
  2342.     = {0x303C,0x0609,0xA816}; 
  2343. æDT OSErr myVariable = AEPutDesc((AEDescList) theAEDescList,()
  2344.                        long index,()
  2345.                        AEDesc theAEDesc);
  2346. æC 
  2347.  
  2348. æKY AEGetNthPtr
  2349. æFc AppleEvents.h
  2350. æT Function
  2351. æD pascal OSErr AEGetNthPtr(AEDescList theAEDescList,
  2352.                          long index,
  2353.                          DescType desiredType,
  2354.                          AEKeyword *theAEKeyword,
  2355.                          DescType *typeCode,
  2356.                          Ptr dataPtr,
  2357.                          Size maximumSize,
  2358.                          Size *actualSize)
  2359.     = {0x303C,0x100A,0xA816}; 
  2360. æDT OSErr myVariable = AEGetNthPtr((AEDescList) theAEDescList,()
  2361.                          long index,()
  2362.                          DescType desiredType,(
  2363.                          AEKeyword) * theAEKeyword,(
  2364.                          DescType) * typeCode,()
  2365.                          Ptr dataPtr,()
  2366.                          Size maximumSize,(
  2367.                          Size) * actualSize);
  2368. æC 
  2369.  
  2370. æKY AEGetNthDesc
  2371. æFc AppleEvents.h
  2372. æT Function
  2373. æD pascal OSErr AEGetNthDesc(AEDescList theAEDescList,
  2374.                           long index,
  2375.                           DescType desiredType,
  2376.                           AEKeyword *theAEKeyword,
  2377.                           AEDesc *result)
  2378.     = {0x303C,0x0A0B,0xA816}; 
  2379. æDT OSErr myVariable = AEGetNthDesc((AEDescList) theAEDescList,()
  2380.                           long index,()
  2381.                           DescType desiredType,(
  2382.                           AEKeyword) * theAEKeyword,(
  2383.                           AEDesc) * result);
  2384. æC 
  2385.  
  2386. æKY AESizeOfNthItem
  2387. æFc AppleEvents.h
  2388. æT Function
  2389. æD pascal OSErr AESizeOfNthItem(AEDescList theAEDescList,
  2390.                              long index,
  2391.                              DescType *typeCode,
  2392.                              Size *dataSize)
  2393.     = {0x303C,0x082A,0xA816}; 
  2394. æDT OSErr myVariable = AESizeOfNthItem((AEDescList) theAEDescList,()
  2395.                              long index,(
  2396.                              DescType) * typeCode,(
  2397.                              Size) * dataSize);
  2398. æC 
  2399.  
  2400. æKY AEGetArray
  2401. æFc AppleEvents.h
  2402. æT Function
  2403. æD pascal OSErr AEGetArray(AEDescList theAEDescList,
  2404.                         AEArrayType arrayType,
  2405.                         AEArrayDataPointer arrayPtr,
  2406.                         Size maximumSize,
  2407.                         DescType *itemType,
  2408.                         Size *itemSize,
  2409.                         long *itemCount)
  2410.     = {0x303C,0x0D0C,0xA816}; 
  2411. æDT OSErr myVariable = AEGetArray((AEDescList) theAEDescList,()
  2412.                         AEArrayType arrayType,()
  2413.                         AEArrayDataPointer arrayPtr,()
  2414.                         Size maximumSize,(
  2415.                         DescType) * itemType,(
  2416.                         Size) * itemSize,(
  2417.                         long) * itemCount);
  2418. æC 
  2419.  
  2420. æKY AEPutArray
  2421. æFc AppleEvents.h
  2422. æT Function
  2423. æD pascal OSErr AEPutArray(AEDescList theAEDescList,
  2424.                         AEArrayType arrayType,
  2425.                         AEArrayDataPointer arrayPtr,
  2426.                         DescType itemType,
  2427.                         Size itemSize,
  2428.                         long itemCount)
  2429.     = {0x303C,0x0B0D,0xA816}; 
  2430. æDT OSErr myVariable = AEPutArray((AEDescList) theAEDescList,()
  2431.                         AEArrayType arrayType,()
  2432.                         AEArrayDataPointer arrayPtr,()
  2433.                         DescType itemType,()
  2434.                         Size itemSize,()
  2435.                         long itemCount);
  2436. æC 
  2437.  
  2438. æKY AEDeleteItem
  2439. æFc AppleEvents.h
  2440. æT Function
  2441. æD pascal OSErr AEDeleteItem(AEDescList theAEDescList,
  2442.                           long index)
  2443.     = {0x303C,0x040E,0xA816}; 
  2444. æDT OSErr myVariable = AEDeleteItem((AEDescList) theAEDescList,()
  2445.                           long index);
  2446. æC 
  2447.  
  2448. æKY AEPutKeyPtr
  2449. æFc AppleEvents.h
  2450. æT Function
  2451. æD pascal OSErr AEPutKeyPtr(AERecord theAERecord,
  2452.                          AEKeyword theAEKeyword,
  2453.                          DescType typeCode,
  2454.                          Ptr dataPtr,
  2455.                          Size dataSize)
  2456.     = {0x303C,0x0A0F,0xA816}; 
  2457. æDT OSErr myVariable = AEPutKeyPtr((AERecord) theAERecord,()
  2458.                          AEKeyword theAEKeyword,()
  2459.                          DescType typeCode,()
  2460.                          Ptr dataPtr,()
  2461.                          Size dataSize);
  2462. æC 
  2463.  
  2464. æKY AEPutKeyDesc
  2465. æFc AppleEvents.h
  2466. æT Function
  2467. æD pascal OSErr AEPutKeyDesc(AERecord theAERecord,
  2468.                           AEKeyword theAEKeyword,
  2469.                           AEDesc theAEDesc)
  2470.     = {0x303C,0x0610,0xA816}; 
  2471. æDT OSErr myVariable = AEPutKeyDesc((AERecord) theAERecord,()
  2472.                           AEKeyword theAEKeyword,()
  2473.                           AEDesc theAEDesc);
  2474. æC 
  2475.  
  2476. æKY AEGetKeyPtr
  2477. æFc AppleEvents.h
  2478. æT Function
  2479. æD pascal OSErr AEGetKeyPtr(AERecord theAERecord,
  2480.                          AEKeyword theAEKeyword,
  2481.                          DescType desiredType,
  2482.                          DescType *typeCode,
  2483.                          Ptr dataPtr,
  2484.                          Size maximumSize,
  2485.                          Size *actualSize)
  2486.     = {0x303C,0x0E11,0xA816}; 
  2487. æDT OSErr myVariable = AEGetKeyPtr((AERecord) theAERecord,()
  2488.                          AEKeyword theAEKeyword,()
  2489.                          DescType desiredType,(
  2490.                          DescType) * typeCode,()
  2491.                          Ptr dataPtr,()
  2492.                          Size maximumSize,(
  2493.                          Size) * actualSize);
  2494. æC 
  2495.  
  2496. æKY AEGetKeyDesc
  2497. æFc AppleEvents.h
  2498. æT Function
  2499. æD pascal OSErr AEGetKeyDesc(AERecord theAERecord,
  2500.                           AEKeyword theAEKeyword,
  2501.                           DescType desiredType,
  2502.                           AEDesc *result)
  2503.     = {0x303C,0x0812,0xA816}; 
  2504. æDT OSErr myVariable = AEGetKeyDesc((AERecord) theAERecord,()
  2505.                           AEKeyword theAEKeyword,()
  2506.                           DescType desiredType,(
  2507.                           AEDesc) * result);
  2508. æC 
  2509.  
  2510. æKY AESizeOfKeyDesc
  2511. æFc AppleEvents.h
  2512. æT Function
  2513. æD pascal OSErr AESizeOfKeyDesc(AERecord theAERecord,
  2514.                              AEKeyword theAEKeyword,
  2515.                              DescType *typeCode,
  2516.                              Size *dataSize)
  2517.     = {0x303C,0x0829,0xA816}; 
  2518. æDT OSErr myVariable = AESizeOfKeyDesc((AERecord) theAERecord,()
  2519.                              AEKeyword theAEKeyword,(
  2520.                              DescType) * typeCode,(
  2521.                              Size) * dataSize);
  2522. æC 
  2523.  
  2524. æKY AEDeleteKeyDesc
  2525. æFc AppleEvents.h
  2526. æT Function
  2527. æD pascal OSErr AEDeleteKeyDesc(AERecord theAERecord,
  2528.                              AEKeyword theAEKeyword)
  2529.     = {0x303C,0x0413,0xA816}; 
  2530. æDT OSErr myVariable = AEDeleteKeyDesc((AERecord) theAERecord,()
  2531.                              AEKeyword theAEKeyword);
  2532. æC 
  2533.  
  2534. æKY AEPutParamPtr
  2535. æFc AppleEvents.h
  2536. æT Function
  2537. æD pascal OSErr AEPutParamPtr(AppleEvent theAppleEvent,
  2538.                            AEKeyword theAEKeyword,
  2539.                            DescType typeCode,
  2540.                            Ptr dataPtr,
  2541.                            Size dataSize)
  2542.     = {0x303C,0x0A0F,0xA816}; 
  2543. æDT OSErr myVariable = AEPutParamPtr((AppleEvent) theAppleEvent,()
  2544.                            AEKeyword theAEKeyword,()
  2545.                            DescType typeCode,()
  2546.                            Ptr dataPtr,()
  2547.                            Size dataSize);
  2548. æC 
  2549.  
  2550. æKY AEPutParamDesc
  2551. æFc AppleEvents.h
  2552. æT Function
  2553. æD pascal OSErr AEPutParamDesc(AppleEvent theAppleEvent,
  2554.                             AEKeyword theAEKeyword,
  2555.                             AEDesc theAEDesc)
  2556.     = {0x303C,0x0610,0xA816}; 
  2557. æDT OSErr myVariable = AEPutParamDesc((AppleEvent) theAppleEvent,()
  2558.                             AEKeyword theAEKeyword,()
  2559.                             AEDesc theAEDesc);
  2560. æC 
  2561.  
  2562. æKY AEGetParamPtr
  2563. æFc AppleEvents.h
  2564. æT Function
  2565. æD pascal OSErr AEGetParamPtr(AppleEvent theAppleEvent,
  2566.                            AEKeyword theAEKeyword,
  2567.                            DescType desiredType,
  2568.                            DescType *typeCode,
  2569.                            Ptr dataPtr,
  2570.                            Size maximumSize,
  2571.                            Size *actualSize)
  2572.     = {0x303C,0x0E11,0xA816}; 
  2573. æDT OSErr myVariable = AEGetParamPtr((AppleEvent) theAppleEvent,()
  2574.                            AEKeyword theAEKeyword,()
  2575.                            DescType desiredType,(
  2576.                            DescType) * typeCode,()
  2577.                            Ptr dataPtr,()
  2578.                            Size maximumSize,(
  2579.                            Size) * actualSize);
  2580. æC 
  2581.  
  2582. æKY AEGetParamDesc
  2583. æFc AppleEvents.h
  2584. æT Function
  2585. æD pascal OSErr AEGetParamDesc(AppleEvent theAppleEvent,
  2586.                             AEKeyword theAEKeyword,
  2587.                             DescType desiredType,
  2588.                             AEDesc *result)
  2589.     = {0x303C,0x0812,0xA816}; 
  2590. æDT OSErr myVariable = AEGetParamDesc((AppleEvent) theAppleEvent,()
  2591.                             AEKeyword theAEKeyword,()
  2592.                             DescType desiredType,(
  2593.                             AEDesc) * result);
  2594. æC 
  2595.  
  2596. æKY AESizeOfParam
  2597. æFc AppleEvents.h
  2598. æT Function
  2599. æD pascal OSErr AESizeOfParam(AppleEvent theAppleEvent,
  2600.                            AEKeyword theAEKeyword,
  2601.                            DescType *typeCode,
  2602.                            Size *dataSize)
  2603.     = {0x303C,0x0829,0xA816}; 
  2604. æDT OSErr myVariable = AESizeOfParam((AppleEvent) theAppleEvent,()
  2605.                            AEKeyword theAEKeyword,(
  2606.                            DescType) * typeCode,(
  2607.                            Size) * dataSize);
  2608. æC 
  2609.  
  2610. æKY AEDeleteParam
  2611. æFc AppleEvents.h
  2612. æT Function
  2613. æD pascal OSErr AEDeleteParam(AppleEvent theAppleEvent,
  2614.                            AEKeyword theAEKeyword)
  2615.     = {0x303C,0x0413,0xA816}; 
  2616. æDT OSErr myVariable = AEDeleteParam((AppleEvent) theAppleEvent,()
  2617.                            AEKeyword theAEKeyword);
  2618. æC 
  2619.  
  2620. æKY AEGetAttributePtr
  2621. æFc AppleEvents.h
  2622. æT Function
  2623. æD pascal OSErr AEGetAttributePtr(AppleEvent theAppleEvent,
  2624.                                AEKeyword theAEKeyword,
  2625.                                DescType desiredType,
  2626.                                DescType *typeCode,
  2627.                                Ptr dataPtr,
  2628.                                Size maximumSize,
  2629.                                Size *actualSize)
  2630.     = {0x303C,0x0E15,0xA816}; 
  2631. æDT OSErr myVariable = AEGetAttributePtr((AppleEvent) theAppleEvent,()
  2632.                                AEKeyword theAEKeyword,()
  2633.                                DescType desiredType,(
  2634.                                DescType) * typeCode,()
  2635.                                Ptr dataPtr,()
  2636.                                Size maximumSize,(
  2637.                                Size) * actualSize);
  2638. æC 
  2639.  
  2640. æKY AEGetAttributeDesc
  2641. æFc AppleEvents.h
  2642. æT Function
  2643. æD pascal OSErr AEGetAttributeDesc(AppleEvent theAppleEvent,
  2644.                                 AEKeyword theAEKeyword,
  2645.                                 DescType desiredType,
  2646.                                 AEDesc *result)
  2647.     = {0x303C,0x0826,0xA816}; 
  2648. æDT OSErr myVariable = AEGetAttributeDesc((AppleEvent) theAppleEvent,()
  2649.                                 AEKeyword theAEKeyword,()
  2650.                                 DescType desiredType,(
  2651.                                 AEDesc) * result);
  2652. æC 
  2653.  
  2654. æKY AESizeOfAttribute
  2655. æFc AppleEvents.h
  2656. æT Function
  2657. æD pascal OSErr AESizeOfAttribute(AppleEvent theAppleEvent,
  2658.                                AEKeyword theAEKeyword,
  2659.                                DescType *typeCode,
  2660.                                Size *dataSize)
  2661.     = {0x303C,0x0828,0xA816}; 
  2662. æDT OSErr myVariable = AESizeOfAttribute((AppleEvent) theAppleEvent,()
  2663.                                AEKeyword theAEKeyword,(
  2664.                                DescType) * typeCode,(
  2665.                                Size) * dataSize);
  2666. æC 
  2667.  
  2668. æKY AEPutAttributePtr
  2669. æFc AppleEvents.h
  2670. æT Function
  2671. æD pascal OSErr AEPutAttributePtr(AppleEvent theAppleEvent,
  2672.                                AEKeyword theAEKeyword,
  2673.                                DescType typeCode,
  2674.                                Ptr dataPtr,
  2675.                                Size dataSize)
  2676.     = {0x303C,0x0A16,0xA816}; 
  2677. æDT OSErr myVariable = AEPutAttributePtr((AppleEvent) theAppleEvent,()
  2678.                                AEKeyword theAEKeyword,()
  2679.                                DescType typeCode,()
  2680.                                Ptr dataPtr,()
  2681.                                Size dataSize);
  2682. æC 
  2683.  
  2684. æKY AEPutAttributeDesc
  2685. æFc AppleEvents.h
  2686. æT Function
  2687. æD pascal OSErr AEPutAttributeDesc(AppleEvent theAppleEvent,
  2688.                                 AEKeyword theAEKeyword,
  2689.                                 AEDesc theAEDesc)
  2690.     = {0x303C,0x0627,0xA816}; 
  2691. æDT OSErr myVariable = AEPutAttributeDesc((AppleEvent) theAppleEvent,()
  2692.                                 AEKeyword theAEKeyword,()
  2693.                                 AEDesc theAEDesc);
  2694. æC 
  2695.  
  2696. æKY AECreateAppleEvent
  2697. æFc AppleEvents.h
  2698. æT Function
  2699. æD pascal OSErr AECreateAppleEvent(AEEventClass theAEEventClass,
  2700.                                 AEEventID theAEEventID,
  2701.                                 AEAddressDesc target,
  2702.                                 short returnID,
  2703.                                 long transactionID,
  2704.                                 AppleEvent *result)
  2705.     = {0x303C,0x0B14,0xA816}; 
  2706. æDT OSErr myVariable = AECreateAppleEvent((AEEventClass) theAEEventClass,()
  2707.                                 AEEventID theAEEventID,()
  2708.                                 AEAddressDesc target,()
  2709.                                 short returnID,()
  2710.                                 long transactionID,(
  2711.                                 AppleEvent) * result);
  2712. æC 
  2713.  
  2714. æKY AESend
  2715. æFc AppleEvents.h
  2716. æT Function
  2717. æD pascal OSErr AESend(AppleEvent theAppleEvent,
  2718.                     AppleEvent *reply,
  2719.                     AESendMode sendMode,
  2720.                     AESendPriority sendPriority,
  2721.                     long timeOutInTicks,
  2722.                     IdleProcPtr idleProc,
  2723.                     EventFilterProcPtr filterProc)
  2724.     = {0x303C,0x0D17,0xA816}; 
  2725. æDT OSErr myVariable = AESend((AppleEvent) theAppleEvent,(
  2726.                     AppleEvent) * reply,()
  2727.                     AESendMode sendMode,()
  2728.                     AESendPriority sendPriority,()
  2729.                     long timeOutInTicks,()
  2730.                     IdleProcPtr idleProc,()
  2731.                     EventFilterProcPtr filterProc);
  2732. æC 
  2733.  
  2734. æKY AEProcessAppleEvent
  2735. æFc AppleEvents.h
  2736. æT Function
  2737. æD pascal OSErr AEProcessAppleEvent(EventRecord theEventRecord)
  2738.     = {0x303C,0x021B,0xA816}; 
  2739. æDT OSErr myVariable = AEProcessAppleEvent((EventRecord) theEventRecord);
  2740. æC 
  2741.  
  2742. æKY AEResetTimer
  2743. æFc AppleEvents.h
  2744. æT Function
  2745. æD pascal OSErr AEResetTimer(AppleEvent reply)
  2746.     = {0x303C,0x0219,0xA816}; 
  2747. æDT OSErr myVariable = AEResetTimer((AppleEvent) reply);
  2748. æC 
  2749.  
  2750. æKY AESuspendTheCurrentEvent
  2751. æFc AppleEvents.h
  2752. æT Function
  2753. æD pascal OSErr AESuspendTheCurrentEvent(AppleEvent theAppleEvent)
  2754.     = {0x303C,0x022B,0xA816}; 
  2755. æDT OSErr myVariable = AESuspendTheCurrentEvent((AppleEvent) theAppleEvent);
  2756. æC 
  2757.  
  2758. æKY AEResumeTheCurrentEvent
  2759. æFc AppleEvents.h
  2760. æT Function
  2761. æD pascal OSErr AEResumeTheCurrentEvent(AppleEvent theAppleEvent,
  2762.                                      AppleEvent reply,
  2763.                                      EventHandlerProcPtr dispatcher,
  2764.                                      long handlerRefcon)
  2765.     = {0x303C,0x0818,0xA816}; 
  2766. æDT OSErr myVariable = AEResumeTheCurrentEvent((AppleEvent) theAppleEvent,()
  2767.                                      AppleEvent reply,()
  2768.                                      EventHandlerProcPtr dispatcher,()
  2769.                                      long handlerRefcon);
  2770. æC 
  2771.  
  2772. æKY AEGetTheCurrentEvent
  2773. æFc AppleEvents.h
  2774. æT Function
  2775. æD pascal OSErr AEGetTheCurrentEvent(AppleEvent *theAppleEvent)
  2776.     = {0x303C,0x021A,0xA816}; 
  2777. æDT OSErr myVariable = AEGetTheCurrentEvent((AppleEvent *) theAppleEvent);
  2778. æC 
  2779.  
  2780. æKY AESetTheCurrentEvent
  2781. æFc AppleEvents.h
  2782. æT Function
  2783. æD pascal OSErr AESetTheCurrentEvent(AppleEvent theAppleEvent)
  2784.     = {0x303C,0x022C,0xA816}; 
  2785. æDT OSErr myVariable = AESetTheCurrentEvent((AppleEvent) theAppleEvent);
  2786. æC 
  2787.  
  2788. æKY AEGetInteractionAllowed
  2789. æFc AppleEvents.h
  2790. æT Function
  2791. æD pascal OSErr AEGetInteractionAllowed(AEInteractAllowed *level)
  2792.     = {0x303C,0x021D,0xA816}; 
  2793. æDT OSErr myVariable = AEGetInteractionAllowed((AEInteractAllowed *) level);
  2794. æC 
  2795.  
  2796. æKY AESetInteractionAllowed
  2797. æFc AppleEvents.h
  2798. æT Function
  2799. æD pascal OSErr AESetInteractionAllowed(AEInteractAllowed level)
  2800.     = {0x303C,0x011E,0xA816}; 
  2801. æDT OSErr myVariable = AESetInteractionAllowed((AEInteractAllowed) level);
  2802. æC 
  2803.  
  2804. æKY AEInteractWithUser
  2805. æFc AppleEvents.h
  2806. æT Function
  2807. æD pascal OSErr AEInteractWithUser(long timeOutInTicks,
  2808.                                 NMRecPtr nmReqPtr,
  2809.                                 IdleProcPtr idleProc)
  2810.     = {0x303C,0x061C,0xA816}; 
  2811. æDT OSErr myVariable = AEInteractWithUser((long) timeOutInTicks,()
  2812.                                 NMRecPtr nmReqPtr,()
  2813.                                 IdleProcPtr idleProc);
  2814. æC 
  2815.  
  2816. æKY AEInstallEventHandler
  2817. æFc AppleEvents.h
  2818. æT Function
  2819. æD pascal OSErr AEInstallEventHandler(AEEventClass theAEEventClass,
  2820.                                    AEEventID theAEEventID,
  2821.                                    EventHandlerProcPtr handler,
  2822.                                    long handlerRefcon,
  2823.                                    Boolean isSysHandler)
  2824.     = {0x303C,0x091F,0xA816}; 
  2825. æDT OSErr myVariable = AEInstallEventHandler((AEEventClass) theAEEventClass,()
  2826.                                    AEEventID theAEEventID,()
  2827.                                    EventHandlerProcPtr handler,()
  2828.                                    long handlerRefcon,()
  2829.                                    Boolean isSysHandler);
  2830. æC 
  2831.  
  2832. æKY AERemoveEventHandler
  2833. æFc AppleEvents.h
  2834. æT Function
  2835. æD pascal OSErr AERemoveEventHandler(AEEventClass theAEEventClass,
  2836.                                   AEEventID theAEEventID,
  2837.                                   EventHandlerProcPtr handler,
  2838.                                   Boolean isSysHandler)
  2839.     = {0x303C,0x0720,0xA816}; 
  2840. æDT OSErr myVariable = AERemoveEventHandler((AEEventClass) theAEEventClass,()
  2841.                                   AEEventID theAEEventID,()
  2842.                                   EventHandlerProcPtr handler,()
  2843.                                   Boolean isSysHandler);
  2844. æC 
  2845.  
  2846. æKY AEGetEventHandler
  2847. æFc AppleEvents.h
  2848. æT Function
  2849. æD pascal OSErr AEGetEventHandler(AEEventClass theAEEventClass,
  2850.                                AEEventID theAEEventID,
  2851.                                EventHandlerProcPtr *handler,
  2852.                                long *handlerRefcon,
  2853.                                Boolean isSysHandler)
  2854.     = {0x303C,0x0921,0xA816}; 
  2855. æDT OSErr myVariable = AEGetEventHandler((AEEventClass) theAEEventClass,()
  2856.                                AEEventID theAEEventID,(
  2857.                                EventHandlerProcPtr) * handler,(
  2858.                                long) * handlerRefcon,()
  2859.                                Boolean isSysHandler);
  2860. æC 
  2861.  
  2862. æKY AEInstallCoercionHandler
  2863. æFc AppleEvents.h
  2864. æT Function
  2865. æD pascal OSErr AEInstallCoercionHandler(DescType fromType,
  2866.                                       DescType toType,
  2867.                                       ProcPtr handler,
  2868.                                       long handlerRefcon,
  2869.                                       Boolean fromTypeIsDesc,
  2870.                                       Boolean isSysHandler)
  2871.     = {0x303C,0x0A22,0xA816}; 
  2872. æDT OSErr myVariable = AEInstallCoercionHandler((DescType) fromType,()
  2873.                                       DescType toType,()
  2874.                                       ProcPtr handler,()
  2875.                                       long handlerRefcon,()
  2876.                                       Boolean fromTypeIsDesc,()
  2877.                                       Boolean isSysHandler);
  2878. æC 
  2879.  
  2880. æKY AERemoveCoercionHandler
  2881. æFc AppleEvents.h
  2882. æT Function
  2883. æD pascal OSErr AERemoveCoercionHandler(DescType fromType,
  2884.                                      DescType toType,
  2885.                                      ProcPtr handler,
  2886.                                      Boolean isSysHandler)
  2887.     = {0x303C,0x0723,0xA816}; 
  2888. æDT OSErr myVariable = AERemoveCoercionHandler((DescType) fromType,()
  2889.                                      DescType toType,()
  2890.                                      ProcPtr handler,()
  2891.                                      Boolean isSysHandler);
  2892. æC 
  2893.  
  2894. æKY AEGetCoercionHandler
  2895. æFc AppleEvents.h
  2896. æT Function
  2897. æD pascal OSErr AEGetCoercionHandler(DescType fromType,
  2898.                                   DescType toType,
  2899.                                   ProcPtr *handler,
  2900.                                   long *handlerRefcon,
  2901.                                   Boolean *fromTypeIsDesc,
  2902.                                   Boolean isSysHandler)
  2903.     = {0x303C,0x0B24,0xA816}; 
  2904. æDT OSErr myVariable = AEGetCoercionHandler((DescType) fromType,()
  2905.                                   DescType toType,(
  2906.                                   ProcPtr) * handler,(
  2907.                                   long) * handlerRefcon,(
  2908.                                   Boolean) * fromTypeIsDesc,()
  2909.                                   Boolean isSysHandler);
  2910. æC 
  2911.  
  2912. æKY AEInstallSpecialHandler
  2913. æFc AppleEvents.h
  2914. æT Function
  2915. æD pascal OSErr AEInstallSpecialHandler(AEKeyword functionClass,
  2916.                                      ProcPtr handler,
  2917.                                      Boolean isSysHandler)
  2918.     = {0x303C,0x0500,0xA816}; 
  2919. æDT OSErr myVariable = AEInstallSpecialHandler((AEKeyword) functionClass,()
  2920.                                      ProcPtr handler,()
  2921.                                      Boolean isSysHandler);
  2922. æC 
  2923.  
  2924. æKY AERemoveSpecialHandler
  2925. æFc AppleEvents.h
  2926. æT Function
  2927. æD pascal OSErr AERemoveSpecialHandler(AEKeyword functionClass,
  2928.                                     ProcPtr handler,
  2929.                                     Boolean isSysHandler)
  2930.     = {0x303C,0x0501,0xA816}; 
  2931. æDT OSErr myVariable = AERemoveSpecialHandler((AEKeyword) functionClass,()
  2932.                                     ProcPtr handler,()
  2933.                                     Boolean isSysHandler);
  2934. æC 
  2935.  
  2936. æKY AEGetSpecialHandler
  2937. æFc AppleEvents.h
  2938. æT Function
  2939. æD pascal OSErr AEGetSpecialHandler(AEKeyword functionClass,
  2940.                                  ProcPtr *handler,
  2941.                                  Boolean isSysHandler)
  2942.     = {0x303C,0x052D,0xA816}; 
  2943. æDT OSErr myVariable = AEGetSpecialHandler((AEKeyword) functionClass,(
  2944.                                  ProcPtr) * handler,()
  2945.                                  Boolean isSysHandler);
  2946. æC 
  2947.  
  2948.  
  2949. æKY AppleTalk.h
  2950. æKL AFPCommand
  2951. ASPAbortOS
  2952. ASPCloseAll
  2953. ASPCloseSession
  2954. ASPGetParms
  2955. ASPGetStatus
  2956. ASPOpenSession
  2957. ASPUserCommand
  2958. ASPUserWrite
  2959. ATEvent
  2960. ATPAddRsp
  2961. ATPCloseSocket
  2962. ATPGetRequest
  2963. ATPKillAllGetReq
  2964. ATPLoad
  2965. ATPOpenSocket
  2966. ATPreFlightEvent
  2967. ATPReqCancel
  2968. ATPRequest
  2969. ATPResponse
  2970. ATPRspCancel
  2971. ATPSndRequest
  2972. ATPSndRsp
  2973. ATPUnload
  2974. BuildBDS
  2975. BuildDDPwds
  2976. BuildLAPwds
  2977. DDPCloseSocket
  2978. DDPOpenSocket
  2979. DDPRdCancel
  2980. DDPRead
  2981. DDPWrite
  2982. GetBridgeAddress
  2983. GetLocalZones
  2984. GetMyZone
  2985. GetNodeAddress
  2986. GetZoneList
  2987. IsATPOpen
  2988. IsMPPOpen
  2989. LAPAddATQ
  2990. LAPCloseProtocol
  2991. LAPOpenProtocol
  2992. LAPRdCancel
  2993. LAPRead
  2994. LAPRmvATQ
  2995. LAPWrite
  2996. MPPClose
  2997. MPPOpen
  2998. NBPConfirm
  2999. NBPExtract
  3000. NBPLoad
  3001. NBPLookup
  3002. NBPRegister
  3003. NBPRemove
  3004. NBPSetEntity
  3005. NBPSetNTE
  3006. NBPUnload
  3007. OpenXPP
  3008. PAddResponse
  3009. PATalkClosePrep
  3010. PAttachPH
  3011. PCloseATPSkt
  3012. PCloseSkt
  3013. PConfirmName
  3014. PDetachPH
  3015. PGetAppleTalkInfo
  3016. PGetRequest
  3017. PKillGetReq
  3018. PKillNBP
  3019. PKillSendReq
  3020. PLookupName
  3021. PNSendRequest
  3022. POpenATPSkt
  3023. POpenSkt
  3024. PRegisterName
  3025. PRelRspCB
  3026. PRelTCB
  3027. PRemoveName
  3028. PSendRequest
  3029. PSendResponse
  3030. PSetSelfSend
  3031. PWriteDDP
  3032. PWriteLAP
  3033.  
  3034. ABByte
  3035. ABCallType
  3036. abortOS
  3037. ABProtoType
  3038. AddrBlock
  3039. addResponse
  3040. afpAddAPPL
  3041. afpAddCmt
  3042. afpAddIcon
  3043. afpByteRangeLock
  3044. afpCall
  3045. AFPCommandBlock
  3046. afpContLogin
  3047. afpCopyFile
  3048. afpDelete
  3049. afpDirClose
  3050. afpDirCreate
  3051. afpDTClose
  3052. afpDTOpen
  3053. afpEnumerate
  3054. afpFileCreate
  3055. afpFlush
  3056. afpForkClose
  3057. afpForkFlush
  3058. afpGetAPPL
  3059. afpGetCmt
  3060. afpGetDirParms
  3061. afpGetFileParms
  3062. afpGetFlDrParms
  3063. afpGetForkParms
  3064. afpGetIcon
  3065. afpGetSInfo
  3066. afpGetSParms
  3067. afpGetVolParms
  3068. afpGtIcnInfo
  3069. afpLogin
  3070. AFPLoginPrm
  3071. afpLogout
  3072. afpMapID
  3073. afpMapName
  3074. afpMove
  3075. afpOpenDir
  3076. afpOpenFork
  3077. afpOpenVol
  3078. afpRead
  3079. afpRename
  3080. afpRmvAPPL
  3081. afpRmvCmt
  3082. afpSetDirParms
  3083. afpSetFileParms
  3084. afpSetFlDrParms
  3085. afpSetForkParms
  3086. afpSetVolParms
  3087. afpVolClose
  3088. afpWrite
  3089. ASPAbortPrm
  3090. ASPGetparmsBlk
  3091. ASPOpenPrm
  3092. ASPOpenPrmPtr
  3093. ATalkClosePrep
  3094. ATalkClosePrepParm
  3095. ATATPRec
  3096. ATATPRecHandle
  3097. ATATPRecPtr
  3098. ATDDPRec
  3099. ATDDPRecHandle
  3100. ATDDPRecPtr
  3101. ATLAPRec
  3102. ATLAPRecHandle
  3103. ATLAPRecPtr
  3104. ATNBPRec
  3105. ATNBPRecHandle
  3106. ATNBPRecPtr
  3107. ATPaddrBlock
  3108. ATPaKillQEl
  3109. ATPatpFlags
  3110. ATPatpSocket
  3111. ATPbdsPointer
  3112. ATPbdsSize
  3113. ATPbitMap
  3114. ATPcsCode
  3115. atpEOMvalue
  3116. ATPioCompletion
  3117. ATPioRefNum
  3118. ATPioResult
  3119. ATPmisc1
  3120. ATPmisc2
  3121. ATPnumOfBuffs
  3122. ATPnumOfResps
  3123. ATPParamBlock
  3124. ATPparms
  3125. ATPPBPtr
  3126. atpProto
  3127. atpRefNum
  3128. ATPreqLength
  3129. ATPreqPointer
  3130. ATPreqTID
  3131. ATPretryCount
  3132. ATPrspNum
  3133. atpSendChkvalue
  3134. atpSize
  3135. atpSTSvalue
  3136. atpTIDValidvalue
  3137. ATPtimeOutVal
  3138. ATPtransID
  3139. atpUnitNum
  3140. ATPuserData
  3141. atpXOvalue
  3142. ATQEntry
  3143. ATQEntryPtr
  3144. attachPH
  3145. ATTransCancelClose
  3146. ATTransClose
  3147. ATTransClosePrep
  3148. ATTransOpen
  3149. BDSElement
  3150. BDSPtr
  3151. BDSType
  3152. BitMapType
  3153. closeAll
  3154. closeATPSkt
  3155. closeSess
  3156. closeSkt
  3157. confirmName
  3158. DDPchecksumFlag
  3159. DDPlistener
  3160. DDPparms
  3161. ddpProto
  3162. ddpSize
  3163. DDPsocket
  3164. DDPwdsPointer
  3165. detachPH
  3166. EntityName
  3167. EntityPtr
  3168. GetAppleTalkInfoParm
  3169. GetATalkInfo
  3170. getParms
  3171. getRequest
  3172. getStatus
  3173. killAllGetReq
  3174. killGetReq
  3175. killNBP
  3176. Killparms
  3177. killSendReq
  3178. LAddAEQ
  3179. LAPAdrBlock
  3180. LAPhandler
  3181. LAPMgrCall
  3182. LAPMgrPtr
  3183. LAPparms
  3184. lapProto
  3185. LAPprotType
  3186. lapSize
  3187. LAPwdsPointer
  3188. lastResident
  3189. loadNBP
  3190. lookupName
  3191. lookupReply
  3192. LRmvAEQ
  3193. MOREATPHeader
  3194. MPPATPHeader
  3195. MPPcsCode
  3196. MPPioCompletion
  3197. MPPioRefNum
  3198. MPPioResult
  3199. MPPParamBlock
  3200. MPPparms
  3201. MPPPBPtr
  3202. mppRefNum
  3203. mppUnitNum
  3204. NamesTableEntry
  3205. NBPconfirmAddr
  3206. NBPcount
  3207. NBPentityPtr
  3208. NBPinterval
  3209. NBPKillparms
  3210. NBPmaxToGet
  3211. NBPnewSocket
  3212. NBPnKillQEl
  3213. NBPntQElPtr
  3214. NBPnumGotten
  3215. NBPparms
  3216. nbpProto
  3217. NBPretBuffPtr
  3218. NBPretBuffSize
  3219. nbpSize
  3220. NBPverifyFlag
  3221. nSendRequest
  3222. NTElement
  3223. openATPSkt
  3224. openSess
  3225. openSkt
  3226. registerName
  3227. relRspCB
  3228. relTCB
  3229. removeName
  3230. RetransType
  3231. scbMemSize
  3232. SendReqparms
  3233. sendRequest
  3234. sendResponse
  3235. SetMyZone
  3236. SetSelfparms
  3237. setSelfSend
  3238. tATPAddRsp
  3239. tATPGetRequest
  3240. tATPRequest
  3241. tATPResponse
  3242. tATPSdRsp
  3243. tATPSndRequest
  3244. tDDPRead
  3245. tDDPWrite
  3246. tLAPRead
  3247. tLAPWrite
  3248. tNBPConfirm
  3249. tNBPLookup
  3250. tNBPRegister
  3251. unloadNBP
  3252. userCommand
  3253. userWrite
  3254. WDSElement
  3255. writeDDP
  3256. writeLAP
  3257. xCall
  3258. XCallParam
  3259. xppFlagClr
  3260. xppFlagSet
  3261. xppLoadedBit
  3262. XPPParamBlock
  3263. XPPParmBlkPtr
  3264. XPPPBHeader
  3265. XPPPrmBlk
  3266. xppRefNum
  3267. xppUnitNum
  3268. zipGetLocalZones
  3269. zipGetMyZone
  3270. zipGetZoneList
  3271.  
  3272. æKY mppUnitNum
  3273. æFc AppleTalk.h
  3274. æT 
  3275. æD     mppUnitNum = 9, /*MPP unit number*/
  3276. æC 
  3277.  
  3278. æKY atpUnitNum
  3279. æFc AppleTalk.h
  3280. æT 
  3281. æD     atpUnitNum = 10, /* ATP unit number */
  3282. æC 
  3283.  
  3284. æKY xppUnitNum
  3285. æFc AppleTalk.h
  3286. æT 
  3287. æD     xppUnitNum = 40, /* XPP unit number */
  3288. æC 
  3289.  
  3290. æKY mppRefNum
  3291. æFc AppleTalk.h
  3292. æT 
  3293. æD     mppRefNum = -10, /*MPP reference number */
  3294. æC 
  3295.  
  3296. æKY atpRefNum
  3297. æFc AppleTalk.h
  3298. æT 
  3299. æD     atpRefNum = -11, /* ATP reference number */
  3300. æC 
  3301.  
  3302. æKY xppRefNum
  3303. æFc AppleTalk.h
  3304. æT 
  3305. æD     xppRefNum = -41, /* XPP reference number */
  3306. æC 
  3307.  
  3308. æKY lookupReply
  3309. æFc AppleTalk.h
  3310. æT 
  3311. æD     lookupReply = 242, /* This command queued to ourself */
  3312. æC 
  3313.  
  3314. æKY writeLAP
  3315. æFc AppleTalk.h
  3316. æT 
  3317. æD     writeLAP = 243, /* Write out LAP packet */
  3318. æC 
  3319.  
  3320. æKY detachPH
  3321. æFc AppleTalk.h
  3322. æT 
  3323. æD     detachPH = 244, /* Detach LAP protocol handler */
  3324. æC 
  3325.  
  3326. æKY attachPH
  3327. æFc AppleTalk.h
  3328. æT 
  3329. æD     attachPH = 245, /* Attach LAP protocol handler */
  3330. æC 
  3331.  
  3332. æKY writeDDP
  3333. æFc AppleTalk.h
  3334. æT 
  3335. æD     writeDDP = 246, /* Write out DDP packet */
  3336. æC 
  3337.  
  3338. æKY closeSkt
  3339. æFc AppleTalk.h
  3340. æT 
  3341. æD     closeSkt = 247, /* Close DDP socket */
  3342. æC 
  3343.  
  3344. æKY openSkt
  3345. æFc AppleTalk.h
  3346. æT 
  3347. æD     openSkt = 248, /* Open DDP socket */
  3348. æC 
  3349.  
  3350. æKY loadNBP
  3351. æFc AppleTalk.h
  3352. æT 
  3353. æD     loadNBP = 249, /* Load NBP command-executing code */
  3354. æC 
  3355.  
  3356. æKY lastResident
  3357. æFc AppleTalk.h
  3358. æT 
  3359. æD     lastResident = 249, /* Last resident command */
  3360. æC 
  3361.  
  3362. æKY confirmName
  3363. æFc AppleTalk.h
  3364. æT 
  3365. æD     confirmName = 250, /* Confirm name */
  3366. æC 
  3367.  
  3368. æKY lookupName
  3369. æFc AppleTalk.h
  3370. æT 
  3371. æD     lookupName = 251, /* Look up name on internet */
  3372. æC 
  3373.  
  3374. æKY removeName
  3375. æFc AppleTalk.h
  3376. æT 
  3377. æD     removeName = 252, /* Remove name from Names Table */
  3378. æC 
  3379.  
  3380. æKY registerName
  3381. æFc AppleTalk.h
  3382. æT 
  3383. æD     registerName = 253, /* Register name in Names Table */
  3384. æC 
  3385.  
  3386. æKY killNBP
  3387. æFc AppleTalk.h
  3388. æT 
  3389. æD     killNBP = 254, /* Kill outstanding NBP request */
  3390. æC 
  3391.  
  3392. æKY unloadNBP
  3393. æFc AppleTalk.h
  3394. æT 
  3395. æD     unloadNBP = 255, /* Unload NBP command code */
  3396. æC 
  3397.  
  3398. æKY setSelfSend
  3399. æFc AppleTalk.h
  3400. æT 
  3401. æD     setSelfSend = 256, /* MPP: Set to allow writes to self */
  3402. æC 
  3403.  
  3404. æKY SetMyZone
  3405. æFc AppleTalk.h
  3406. æT 
  3407. æD     SetMyZone = 257, /* Set my zone name */
  3408. æC 
  3409.  
  3410. æKY GetATalkInfo
  3411. æFc AppleTalk.h
  3412. æT 
  3413. æD     GetATalkInfo = 258, /* get AppleTalk information */
  3414. æC 
  3415.  
  3416. æKY ATalkClosePrep
  3417. æFc AppleTalk.h
  3418. æT 
  3419. æD     ATalkClosePrep = 259, /* AppleTalk close query */
  3420. æC 
  3421.  
  3422. æKY nSendRequest
  3423. æFc AppleTalk.h
  3424. æT 
  3425. æD     nSendRequest = 248, /* NSendRequest code */
  3426. æC 
  3427.  
  3428. æKY relRspCB
  3429. æFc AppleTalk.h
  3430. æT 
  3431. æD     relRspCB = 249, /* Release RspCB */
  3432. æC 
  3433.  
  3434. æKY closeATPSkt
  3435. æFc AppleTalk.h
  3436. æT 
  3437. æD     closeATPSkt = 250, /* Close ATP socket */
  3438. æC 
  3439.  
  3440. æKY addResponse
  3441. æFc AppleTalk.h
  3442. æT 
  3443. æD     addResponse = 251, /* Add response code | Require open skt */
  3444. æC 
  3445.  
  3446. æKY sendResponse
  3447. æFc AppleTalk.h
  3448. æT 
  3449. æD     sendResponse = 252, /* Send response code */
  3450. æC 
  3451.  
  3452. æKY getRequest
  3453. æFc AppleTalk.h
  3454. æT 
  3455. æD     getRequest = 253, /* Get request code */
  3456. æC 
  3457.  
  3458. æKY openATPSkt
  3459. æFc AppleTalk.h
  3460. æT 
  3461. æD     openATPSkt = 254, /* Open ATP socket */
  3462. æC 
  3463.  
  3464. æKY sendRequest
  3465. æFc AppleTalk.h
  3466. æT 
  3467. æD     sendRequest = 255, /* Send request code */
  3468. æC 
  3469.  
  3470. æKY relTCB
  3471. æFc AppleTalk.h
  3472. æT 
  3473. æD     relTCB = 256, /* Release TCB */
  3474. æC 
  3475.  
  3476. æKY killGetReq
  3477. æFc AppleTalk.h
  3478. æT 
  3479. æD     killGetReq = 257, /* Kill GetRequest */
  3480. æC 
  3481.  
  3482. æKY killSendReq
  3483. æFc AppleTalk.h
  3484. æT 
  3485. æD     killSendReq = 258, /* Kill SendRequest */
  3486. æC 
  3487.  
  3488. æKY killAllGetReq
  3489. æFc AppleTalk.h
  3490. æT 
  3491. æD     killAllGetReq = 259, /* Kill all getRequests for a skt */
  3492. æC 
  3493.  
  3494. æKY openSess
  3495. æFc AppleTalk.h
  3496. æT 
  3497. æD     openSess = 255, /* Open session */
  3498. æC 
  3499.  
  3500. æKY closeSess
  3501. æFc AppleTalk.h
  3502. æT 
  3503. æD     closeSess = 254, /* Close session */
  3504. æC 
  3505.  
  3506. æKY userCommand
  3507. æFc AppleTalk.h
  3508. æT 
  3509. æD     userCommand = 253, /* User command */
  3510. æC 
  3511.  
  3512. æKY userWrite
  3513. æFc AppleTalk.h
  3514. æT 
  3515. æD     userWrite = 252, /* User write */
  3516. æC 
  3517.  
  3518. æKY getStatus
  3519. æFc AppleTalk.h
  3520. æT 
  3521. æD     getStatus = 251, /* Get status */
  3522. æC 
  3523.  
  3524. æKY afpCall
  3525. æFc AppleTalk.h
  3526. æT 
  3527. æD     afpCall = 250, /* AFP command (buffer has command code) */
  3528. æC 
  3529.  
  3530. æKY getParms
  3531. æFc AppleTalk.h
  3532. æT 
  3533. æD     getParms = 249, /* Get parameters */
  3534. æC 
  3535.  
  3536. æKY abortOS
  3537. æFc AppleTalk.h
  3538. æT 
  3539. æD     abortOS = 248, /* Abort open session request */
  3540. æC 
  3541.  
  3542. æKY closeAll
  3543. æFc AppleTalk.h
  3544. æT 
  3545. æD     closeAll = 247, /* Close all open sessions */
  3546. æC 
  3547.  
  3548. æKY xCall
  3549. æFc AppleTalk.h
  3550. æT 
  3551. æD     xCall = 246, /* .XPP extended calls */
  3552. æC 
  3553.  
  3554. æKY ATTransOpen
  3555. æFc AppleTalk.h
  3556. æT 
  3557. æD     ATTransOpen = 0, /*AppleTalk has opened*/
  3558. æC 
  3559.  
  3560. æKY ATTransClose
  3561. æFc AppleTalk.h
  3562. æT 
  3563. æD     ATTransClose = 2, /*AppleTalk is about to close*/
  3564. æC 
  3565.  
  3566. æKY ATTransClosePrep
  3567. æFc AppleTalk.h
  3568. æT 
  3569. æD     ATTransClosePrep = 3, /*Is it OK to close AppleTalk ?*/
  3570. æC 
  3571.  
  3572. æKY ATTransCancelClose
  3573. æFc AppleTalk.h
  3574. æT 
  3575. æD     ATTransCancelClose = 4, /*Cancel the ClosePrep transition*/
  3576. æC 
  3577.  
  3578. æKY afpByteRangeLock
  3579. æFc AppleTalk.h
  3580. æT 
  3581. æD     afpByteRangeLock = 1, /*AFPCall command codes*/
  3582. æC 
  3583.  
  3584. æKY afpVolClose
  3585. æFc AppleTalk.h
  3586. æT 
  3587. æD     afpVolClose = 2, /*AFPCall command codes*/
  3588. æC 
  3589.  
  3590. æKY afpDirClose
  3591. æFc AppleTalk.h
  3592. æT 
  3593. æD     afpDirClose = 3, /*AFPCall command codes*/
  3594. æC 
  3595.  
  3596. æKY afpForkClose
  3597. æFc AppleTalk.h
  3598. æT 
  3599. æD     afpForkClose = 4, /*AFPCall command codes*/
  3600. æC 
  3601.  
  3602. æKY afpCopyFile
  3603. æFc AppleTalk.h
  3604. æT 
  3605. æD     afpCopyFile = 5, /*AFPCall command codes*/
  3606. æC 
  3607.  
  3608. æKY afpDirCreate
  3609. æFc AppleTalk.h
  3610. æT 
  3611. æD     afpDirCreate = 6, /*AFPCall command codes*/
  3612. æC 
  3613.  
  3614. æKY afpFileCreate
  3615. æFc AppleTalk.h
  3616. æT 
  3617. æD     afpFileCreate = 7, /*AFPCall command codes*/
  3618. æC 
  3619.  
  3620. æKY afpDelete
  3621. æFc AppleTalk.h
  3622. æT 
  3623. æD     afpDelete = 8, /*AFPCall command codes*/
  3624. æC 
  3625.  
  3626. æKY afpEnumerate
  3627. æFc AppleTalk.h
  3628. æT 
  3629. æD     afpEnumerate = 9, /*AFPCall command codes*/
  3630. æC 
  3631.  
  3632. æKY afpFlush
  3633. æFc AppleTalk.h
  3634. æT 
  3635. æD     afpFlush = 10, /*AFPCall command codes*/
  3636. æC 
  3637.  
  3638. æKY afpForkFlush
  3639. æFc AppleTalk.h
  3640. æT 
  3641. æD     afpForkFlush = 11, /*AFPCall command codes*/
  3642. æC 
  3643.  
  3644. æKY afpGetDirParms
  3645. æFc AppleTalk.h
  3646. æT 
  3647. æD     afpGetDirParms = 12, /*AFPCall command codes*/
  3648. æC 
  3649.  
  3650. æKY afpGetFileParms
  3651. æFc AppleTalk.h
  3652. æT 
  3653. æD     afpGetFileParms = 13, /*AFPCall command codes*/
  3654. æC 
  3655.  
  3656. æKY afpGetForkParms
  3657. æFc AppleTalk.h
  3658. æT 
  3659. æD     afpGetForkParms = 14, /*AFPCall command codes*/
  3660. æC 
  3661.  
  3662. æKY afpGetSInfo
  3663. æFc AppleTalk.h
  3664. æT 
  3665. æD     afpGetSInfo = 15, /*AFPCall command codes*/
  3666. æC 
  3667.  
  3668. æKY afpGetSParms
  3669. æFc AppleTalk.h
  3670. æT 
  3671. æD     afpGetSParms = 16, /*AFPCall command codes*/
  3672. æC 
  3673.  
  3674. æKY afpGetVolParms
  3675. æFc AppleTalk.h
  3676. æT 
  3677. æD     afpGetVolParms = 17, /*AFPCall command codes*/
  3678. æC 
  3679.  
  3680. æKY afpLogin
  3681. æFc AppleTalk.h
  3682. æT 
  3683. æD     afpLogin = 18, /*AFPCall command codes*/
  3684. æC 
  3685.  
  3686. æKY afpContLogin
  3687. æFc AppleTalk.h
  3688. æT 
  3689. æD     afpContLogin = 19, /*AFPCall command codes*/
  3690. æC 
  3691.  
  3692. æKY afpLogout
  3693. æFc AppleTalk.h
  3694. æT 
  3695. æD     afpLogout = 20, /*AFPCall command codes*/
  3696. æC 
  3697.  
  3698. æKY afpMapID
  3699. æFc AppleTalk.h
  3700. æT 
  3701. æD     afpMapID = 21, /*AFPCall command codes*/
  3702. æC 
  3703.  
  3704. æKY afpMapName
  3705. æFc AppleTalk.h
  3706. æT 
  3707. æD     afpMapName = 22, /*AFPCall command codes*/
  3708. æC 
  3709.  
  3710. æKY afpMove
  3711. æFc AppleTalk.h
  3712. æT 
  3713. æD     afpMove = 23, /*AFPCall command codes*/
  3714. æC 
  3715.  
  3716. æKY afpOpenVol
  3717. æFc AppleTalk.h
  3718. æT 
  3719. æD     afpOpenVol = 24, /*AFPCall command codes*/
  3720. æC 
  3721.  
  3722. æKY afpOpenDir
  3723. æFc AppleTalk.h
  3724. æT 
  3725. æD     afpOpenDir = 25, /*AFPCall command codes*/
  3726. æC 
  3727.  
  3728. æKY afpOpenFork
  3729. æFc AppleTalk.h
  3730. æT 
  3731. æD     afpOpenFork = 26, /*AFPCall command codes*/
  3732. æC 
  3733.  
  3734. æKY afpRead
  3735. æFc AppleTalk.h
  3736. æT 
  3737. æD     afpRead = 27, /*AFPCall command codes*/
  3738. æC 
  3739.  
  3740. æKY afpRename
  3741. æFc AppleTalk.h
  3742. æT 
  3743. æD     afpRename = 28, /*AFPCall command codes*/
  3744. æC 
  3745.  
  3746. æKY afpSetDirParms
  3747. æFc AppleTalk.h
  3748. æT 
  3749. æD     afpSetDirParms = 29, /*AFPCall command codes*/
  3750. æC 
  3751.  
  3752. æKY afpSetFileParms
  3753. æFc AppleTalk.h
  3754. æT 
  3755. æD     afpSetFileParms = 30, /*AFPCall command codes*/
  3756. æC 
  3757.  
  3758. æKY afpSetForkParms
  3759. æFc AppleTalk.h
  3760. æT 
  3761. æD     afpSetForkParms = 31, /*AFPCall command codes*/
  3762. æC 
  3763.  
  3764. æKY afpSetVolParms
  3765. æFc AppleTalk.h
  3766. æT 
  3767. æD     afpSetVolParms = 32, /*AFPCall command codes*/
  3768. æC 
  3769.  
  3770. æKY afpWrite
  3771. æFc AppleTalk.h
  3772. æT 
  3773. æD     afpWrite = 33, /*AFPCall command codes*/
  3774. æC 
  3775.  
  3776. æKY afpGetFlDrParms
  3777. æFc AppleTalk.h
  3778. æT 
  3779. æD     afpGetFlDrParms = 34, /*AFPCall command codes*/
  3780. æC 
  3781.  
  3782. æKY afpSetFlDrParms
  3783. æFc AppleTalk.h
  3784. æT 
  3785. æD     afpSetFlDrParms = 35, /*AFPCall command codes*/
  3786. æC 
  3787.  
  3788. æKY afpDTOpen
  3789. æFc AppleTalk.h
  3790. æT 
  3791. æD     afpDTOpen = 48, /*AFPCall command codes*/
  3792. æC 
  3793.  
  3794. æKY afpDTClose
  3795. æFc AppleTalk.h
  3796. æT 
  3797. æD     afpDTClose = 49, /*AFPCall command codes*/
  3798. æC 
  3799.  
  3800. æKY afpGetIcon
  3801. æFc AppleTalk.h
  3802. æT 
  3803. æD     afpGetIcon = 51, /*AFPCall command codes*/
  3804. æC 
  3805.  
  3806. æKY afpGtIcnInfo
  3807. æFc AppleTalk.h
  3808. æT 
  3809. æD     afpGtIcnInfo = 52, /*AFPCall command codes*/
  3810. æC 
  3811.  
  3812. æKY afpAddAPPL
  3813. æFc AppleTalk.h
  3814. æT 
  3815. æD     afpAddAPPL = 53, /*AFPCall command codes*/
  3816. æC 
  3817.  
  3818. æKY afpRmvAPPL
  3819. æFc AppleTalk.h
  3820. æT 
  3821. æD     afpRmvAPPL = 54, /*AFPCall command codes*/
  3822. æC 
  3823.  
  3824. æKY afpGetAPPL
  3825. æFc AppleTalk.h
  3826. æT 
  3827. æD     afpGetAPPL = 55, /*AFPCall command codes*/
  3828. æC 
  3829.  
  3830. æKY afpAddCmt
  3831. æFc AppleTalk.h
  3832. æT 
  3833. æD     afpAddCmt = 56, /*AFPCall command codes*/
  3834. æC 
  3835.  
  3836. æKY afpRmvCmt
  3837. æFc AppleTalk.h
  3838. æT 
  3839. æD     afpRmvCmt = 57, /*AFPCall command codes*/
  3840. æC 
  3841.  
  3842. æKY afpGetCmt
  3843. æFc AppleTalk.h
  3844. æT 
  3845. æD     afpGetCmt = 58, /*AFPCall command codes*/
  3846. æC 
  3847.  
  3848. æKY afpAddIcon
  3849. æFc AppleTalk.h
  3850. æT 
  3851. æD     afpAddIcon = 192, /*Special code for ASP Write commands*/
  3852. æC 
  3853.  
  3854. æKY xppLoadedBit
  3855. æFc AppleTalk.h
  3856. æT 
  3857. æD     xppLoadedBit = 5, /* XPP bit in PortBUse */
  3858. æC 
  3859.  
  3860. æKY scbMemSize
  3861. æFc AppleTalk.h
  3862. æT 
  3863. æD     scbMemSize = 192, /*Size of memory for SCB */
  3864. æC 
  3865.  
  3866. æKY xppFlagClr
  3867. æFc AppleTalk.h
  3868. æT 
  3869. æD     xppFlagClr = 0, /*Cs for AFPCommandBlock */
  3870. æC 
  3871.  
  3872. æKY xppFlagSet
  3873. æFc AppleTalk.h
  3874. æT 
  3875. æD     xppFlagSet = 128, /*StartEndFlag & NewLineFlag fields. */
  3876. æC 
  3877.  
  3878. æKY lapSize
  3879. æFc AppleTalk.h
  3880. æT 
  3881. æD     lapSize = 20,
  3882. æC 
  3883.  
  3884. æKY ddpSize
  3885. æFc AppleTalk.h
  3886. æT 
  3887. æD     ddpSize = 26,
  3888. æC 
  3889.  
  3890. æKY nbpSize
  3891. æFc AppleTalk.h
  3892. æT 
  3893. æD     nbpSize = 26,
  3894. æC 
  3895.  
  3896. æKY atpSize
  3897. æFc AppleTalk.h
  3898. æT 
  3899. æD     atpSize = 56,
  3900. æC 
  3901.  
  3902. æKY MPPioCompletion
  3903. æFc AppleTalk.h
  3904. æT #define
  3905. æD #define MPPioCompletion MPP.ioCompletion
  3906. æC 
  3907.  
  3908. æKY MPPioResult
  3909. æFc AppleTalk.h
  3910. æT #define
  3911. æD #define MPPioResult MPP.ioResult
  3912. æC 
  3913.  
  3914. æKY MPPioRefNum
  3915. æFc AppleTalk.h
  3916. æT #define
  3917. æD #define MPPioRefNum MPP.ioRefNum
  3918. æC 
  3919.  
  3920. æKY MPPcsCode
  3921. æFc AppleTalk.h
  3922. æT #define
  3923. æD #define MPPcsCode MPP.csCode
  3924. æC 
  3925.  
  3926. æKY LAPprotType
  3927. æFc AppleTalk.h
  3928. æT #define
  3929. æD #define LAPprotType LAP.protType
  3930. æC 
  3931.  
  3932. æKY LAPwdsPointer
  3933. æFc AppleTalk.h
  3934. æT #define
  3935. æD #define LAPwdsPointer LAP.LAPptrs.wdsPointer
  3936. æC 
  3937.  
  3938. æKY LAPhandler
  3939. æFc AppleTalk.h
  3940. æT #define
  3941. æD #define LAPhandler LAP.LAPptrs.handler
  3942. æC 
  3943.  
  3944. æKY DDPsocket
  3945. æFc AppleTalk.h
  3946. æT #define
  3947. æD #define DDPsocket DDP.socket
  3948. æC 
  3949.  
  3950. æKY DDPchecksumFlag
  3951. æFc AppleTalk.h
  3952. æT #define
  3953. æD #define DDPchecksumFlag DDP.checksumFlag
  3954. æC 
  3955.  
  3956. æKY DDPwdsPointer
  3957. æFc AppleTalk.h
  3958. æT #define
  3959. æD #define DDPwdsPointer DDP.DDPptrs.wdsPointer
  3960. æC 
  3961.  
  3962. æKY DDPlistener
  3963. æFc AppleTalk.h
  3964. æT #define
  3965. æD #define DDPlistener DDP.DDPptrs.listener
  3966. æC 
  3967.  
  3968. æKY NBPinterval
  3969. æFc AppleTalk.h
  3970. æT #define
  3971. æD #define NBPinterval NBP.interval
  3972. æC 
  3973.  
  3974. æKY NBPcount
  3975. æFc AppleTalk.h
  3976. æT #define
  3977. æD #define NBPcount NBP.count
  3978. æC 
  3979.  
  3980. æKY NBPntQElPtr
  3981. æFc AppleTalk.h
  3982. æT #define
  3983. æD #define NBPntQElPtr NBP.NBPPtrs.ntQElPtr
  3984. æC 
  3985.  
  3986. æKY NBPentityPtr
  3987. æFc AppleTalk.h
  3988. æT #define
  3989. æD #define NBPentityPtr NBP.NBPPtrs.entityPtr
  3990. æC 
  3991.  
  3992. æKY NBPverifyFlag
  3993. æFc AppleTalk.h
  3994. æT #define
  3995. æD #define NBPverifyFlag NBP.parm.verifyFlag
  3996. æC 
  3997.  
  3998. æKY NBPretBuffPtr
  3999. æFc AppleTalk.h
  4000. æT #define
  4001. æD #define NBPretBuffPtr NBP.parm.Lookup.retBuffPtr
  4002. æC 
  4003.  
  4004. æKY NBPretBuffSize
  4005. æFc AppleTalk.h
  4006. æT #define
  4007. æD #define NBPretBuffSize NBP.parm.Lookup.retBuffSize
  4008. æC 
  4009.  
  4010. æKY NBPmaxToGet
  4011. æFc AppleTalk.h
  4012. æT #define
  4013. æD #define NBPmaxToGet NBP.parm.Lookup.maxToGet
  4014. æC 
  4015.  
  4016. æKY NBPnumGotten
  4017. æFc AppleTalk.h
  4018. æT #define
  4019. æD #define NBPnumGotten NBP.parm.Lookup.numGotten
  4020. æC 
  4021.  
  4022. æKY NBPconfirmAddr
  4023. æFc AppleTalk.h
  4024. æT #define
  4025. æD #define NBPconfirmAddr NBP.parm.Confirm.confirmAddr
  4026. æC 
  4027.  
  4028. æKY NBPnKillQEl
  4029. æFc AppleTalk.h
  4030. æT #define
  4031. æD #define NBPnKillQEl NBPKILL.nKillQEl
  4032. æC 
  4033.  
  4034. æKY NBPnewSocket
  4035. æFc AppleTalk.h
  4036. æT #define
  4037. æD #define NBPnewSocket NBP.parm.Confirm.newSocket
  4038. æC 
  4039.  
  4040. æKY ATPioCompletion
  4041. æFc AppleTalk.h
  4042. æT #define
  4043. æD #define ATPioCompletion ATP.ioCompletion
  4044. æC 
  4045.  
  4046. æKY ATPioResult
  4047. æFc AppleTalk.h
  4048. æT #define
  4049. æD #define ATPioResult ATP.ioResult
  4050. æC 
  4051.  
  4052. æKY ATPuserData
  4053. æFc AppleTalk.h
  4054. æT #define
  4055. æD #define ATPuserData ATP.userData
  4056. æC 
  4057.  
  4058. æKY ATPreqTID
  4059. æFc AppleTalk.h
  4060. æT #define
  4061. æD #define ATPreqTID ATP.reqTID
  4062. æC 
  4063.  
  4064. æKY ATPioRefNum
  4065. æFc AppleTalk.h
  4066. æT #define
  4067. æD #define ATPioRefNum ATP.ioRefNum
  4068. æC 
  4069.  
  4070. æKY ATPcsCode
  4071. æFc AppleTalk.h
  4072. æT #define
  4073. æD #define ATPcsCode ATP.csCode
  4074. æC 
  4075.  
  4076. æKY ATPatpSocket
  4077. æFc AppleTalk.h
  4078. æT #define
  4079. æD #define ATPatpSocket ATP.atpSocket
  4080. æC 
  4081.  
  4082. æKY ATPatpFlags
  4083. æFc AppleTalk.h
  4084. æT #define
  4085. æD #define ATPatpFlags ATP.atpFlags
  4086. æC 
  4087.  
  4088. æKY ATPaddrBlock
  4089. æFc AppleTalk.h
  4090. æT #define
  4091. æD #define ATPaddrBlock ATP.addrBlock
  4092. æC 
  4093.  
  4094. æKY ATPreqLength
  4095. æFc AppleTalk.h
  4096. æT #define
  4097. æD #define ATPreqLength ATP.reqLength
  4098. æC 
  4099.  
  4100. æKY ATPreqPointer
  4101. æFc AppleTalk.h
  4102. æT #define
  4103. æD #define ATPreqPointer ATP.reqPointer
  4104. æC 
  4105.  
  4106. æKY ATPbdsPointer
  4107. æFc AppleTalk.h
  4108. æT #define
  4109. æD #define ATPbdsPointer ATP.bdsPointer
  4110. æC 
  4111.  
  4112. æKY ATPtimeOutVal
  4113. æFc AppleTalk.h
  4114. æT #define
  4115. æD #define ATPtimeOutVal SREQ.timeOutVal
  4116. æC 
  4117.  
  4118. æKY ATPnumOfResps
  4119. æFc AppleTalk.h
  4120. æT #define
  4121. æD #define ATPnumOfResps SREQ.numOfResps
  4122. æC 
  4123.  
  4124. æKY ATPretryCount
  4125. æFc AppleTalk.h
  4126. æT #define
  4127. æD #define ATPretryCount SREQ.retryCount
  4128. æC 
  4129.  
  4130. æKY ATPnumOfBuffs
  4131. æFc AppleTalk.h
  4132. æT #define
  4133. æD #define ATPnumOfBuffs OTH1.u0.numOfBuffs
  4134. æC 
  4135.  
  4136. æKY ATPbitMap
  4137. æFc AppleTalk.h
  4138. æT #define
  4139. æD #define ATPbitMap OTH1.u0.bitMap
  4140. æC 
  4141.  
  4142. æKY ATPrspNum
  4143. æFc AppleTalk.h
  4144. æT #define
  4145. æD #define ATPrspNum OTH1.u0.rspNum
  4146. æC 
  4147.  
  4148. æKY ATPbdsSize
  4149. æFc AppleTalk.h
  4150. æT #define
  4151. æD #define ATPbdsSize OTH2.bdsSize
  4152. æC 
  4153.  
  4154. æKY ATPtransID
  4155. æFc AppleTalk.h
  4156. æT #define
  4157. æD #define ATPtransID OTH2.transID
  4158. æC 
  4159.  
  4160. æKY ATPaKillQEl
  4161. æFc AppleTalk.h
  4162. æT #define
  4163. æD #define ATPaKillQEl KILL.aKillQEl
  4164. æC 
  4165.  
  4166. æKY atpXOvalue
  4167. æFc AppleTalk.h
  4168. æT 
  4169. æD     atpXOvalue = 32, /*ATP exactly-once bit */
  4170. æC 
  4171.  
  4172. æKY atpEOMvalue
  4173. æFc AppleTalk.h
  4174. æT 
  4175. æD     atpEOMvalue = 16, /*ATP End-Of-Message bit */
  4176. æC 
  4177.  
  4178. æKY atpSTSvalue
  4179. æFc AppleTalk.h
  4180. æT 
  4181. æD     atpSTSvalue = 8, /*ATP Send-Transmission-Status bit */
  4182. æC 
  4183.  
  4184. æKY atpTIDValidvalue
  4185. æFc AppleTalk.h
  4186. æT 
  4187. æD     atpTIDValidvalue = 2, /*ATP trans. ID valid bit */
  4188. æC 
  4189.  
  4190. æKY atpSendChkvalue
  4191. æFc AppleTalk.h
  4192. æT 
  4193. æD     atpSendChkvalue = 1, /*ATP send checksum bit */
  4194. æC 
  4195.  
  4196. æKY zipGetLocalZones
  4197. æFc AppleTalk.h
  4198. æT 
  4199. æD     zipGetLocalZones = 5,
  4200. æC 
  4201.  
  4202. æKY zipGetZoneList
  4203. æFc AppleTalk.h
  4204. æT 
  4205. æD     zipGetZoneList = 6,
  4206. æC 
  4207.  
  4208. æKY zipGetMyZone
  4209. æFc AppleTalk.h
  4210. æT 
  4211. æD     zipGetMyZone = 7,
  4212. æC 
  4213.  
  4214. æKY LAPMgrPtr
  4215. æFc AppleTalk.h
  4216. æT 
  4217. æD     LAPMgrPtr = 0xB18, /*Entry point for LAP Manager*/
  4218. æC 
  4219.  
  4220. æKY LAPMgrCall
  4221. æFc AppleTalk.h
  4222. æT 
  4223. æD     LAPMgrCall = 2, /*Offset to LAP routines*/
  4224. æC 
  4225.  
  4226. æKY LAddAEQ
  4227. æFc AppleTalk.h
  4228. æT 
  4229. æD     LAddAEQ = 23, /*LAPAddATQ routine selector*/
  4230. æC 
  4231.  
  4232. æKY LRmvAEQ
  4233. æFc AppleTalk.h
  4234. æT 
  4235. æD     LRmvAEQ = 24, /*LAPRmvATQ routine selector*/
  4236. æC 
  4237.  
  4238. æKY ABCallType
  4239. tLAPRead
  4240. tLAPWrite
  4241. tDDPRead
  4242. tDDPWrite
  4243. tNBPLookup
  4244. tNBPConfirm
  4245. tNBPRegister
  4246. tATPSndRequest
  4247. tATPGetRequest
  4248. tATPSdRsp
  4249. tATPAddRsp
  4250. tATPRequest
  4251. tATPResponse
  4252. æFc AppleTalk.h
  4253. æT enum
  4254. æD enum {tLAPRead,tLAPWrite,tDDPRead,tDDPWrite,tNBPLookup,tNBPConfirm,tNBPRegister,
  4255.     tATPSndRequest,tATPGetRequest,tATPSdRsp,tATPAddRsp,tATPRequest,tATPResponse};
  4256. typedef unsigned char ABCallType;
  4257. æC 
  4258.  
  4259. æKY ABProtoType
  4260. lapProto
  4261. ddpProto
  4262. nbpProto
  4263. atpProto
  4264.  
  4265. æFc AppleTalk.h
  4266. æT enum
  4267. æD enum {lapProto,ddpProto,nbpProto,atpProto};
  4268. typedef unsigned char ABProtoType;
  4269. æC 
  4270.  
  4271. æKY ABByte
  4272. æFc AppleTalk.h
  4273. æT typedef
  4274. æD typedef Byte ABByte;
  4275. æC 
  4276.  
  4277. æKY LAPAdrBlock
  4278. æFc AppleTalk.h
  4279. æT struct
  4280. æD struct LAPAdrBlock {
  4281.     unsigned char dstNodeID;
  4282.     unsigned char srcNodeID;
  4283.     ABByte lapProtType;
  4284. };
  4285.  
  4286. typedef struct LAPAdrBlock LAPAdrBlock;
  4287. æC 
  4288.  
  4289. æKY ATQEntry
  4290. ATQEntryPtr
  4291. æFc AppleTalk.h
  4292. æT struct
  4293. æD struct ATQEntry {
  4294.     struct ATQEntry *qLink; /*next queue entry*/
  4295.     short qType; /*queue type*/
  4296.     ProcPtr CallAddr; /*pointer to your routine*/
  4297. };
  4298.  
  4299. typedef struct ATQEntry ATQEntry;
  4300. typedef ATQEntry *ATQEntryPtr;
  4301. æC 
  4302.  
  4303. æKY AddrBlock
  4304. æFc AppleTalk.h
  4305. æT struct
  4306. æD struct AddrBlock {
  4307.     short aNet;
  4308.     unsigned char aNode;
  4309.     unsigned char aSocket;
  4310. };
  4311.  
  4312. typedef struct AddrBlock AddrBlock;
  4313. æC 
  4314.  
  4315. æKY EntityName
  4316. EntityPtr
  4317. æFc AppleTalk.h
  4318. æT struct
  4319. æD struct EntityName {
  4320.     Str32 objStr;
  4321.     char pad1; /*Str32's aligned on even word boundries.*/
  4322.     Str32 typeStr;
  4323.     char pad2;
  4324.     Str32 zoneStr;
  4325.     char pad3;
  4326. };
  4327.  
  4328. typedef struct EntityName EntityName;
  4329. typedef EntityName *EntityPtr;
  4330. æC \* Real definition of EntityName is 3 PACKED strings of any length (32 is just an 
  4331. example). No offsets for Asm since each String address must be calculated by adding 
  4332. length byte to last string ptr. 
  4333.  
  4334. In Pascal, String(32) will be 34 bytes long since fields never start on an odd byte 
  4335. unless they are only a byte long. So this will generate correct looking interfaces for 
  4336. Pascal and C, but they will not be the same, which is OK since they are not used. */
  4337.  
  4338. æKY RetransType
  4339. æFc AppleTalk.h
  4340. æT struct
  4341. æD struct RetransType {
  4342.     unsigned char retransInterval;
  4343.     unsigned char retransCount;
  4344. };
  4345.  
  4346. typedef struct RetransType RetransType;
  4347. æC 
  4348.  
  4349. æKY BDSElement
  4350. æFc AppleTalk.h
  4351. æT struct
  4352. æD struct BDSElement {
  4353.     short buffSize;
  4354.     Ptr buffPtr;
  4355.     short dataSize;
  4356.     long userBytes;
  4357. };
  4358.  
  4359. typedef struct BDSElement BDSElement;
  4360. æC 
  4361.  
  4362. æKY BDSType
  4363. æFc AppleTalk.h
  4364. æT typedef
  4365. æD typedef BDSElement BDSType[8];
  4366. æC 
  4367.  
  4368. æKY BDSPtr
  4369. æFc AppleTalk.h
  4370. æT typedef
  4371. æD typedef BDSType *BDSPtr;
  4372. æC 
  4373.  
  4374. æKY BitMapType
  4375. æFc AppleTalk.h
  4376. æT typedef
  4377. æD typedef char BitMapType;
  4378. æC 
  4379.  
  4380. æKY ATLAPRec
  4381. ATLAPRecPtr
  4382. ATLAPRecHandle
  4383. æFc AppleTalk.h
  4384. æT struct
  4385. æD struct ATLAPRec {
  4386.     ABCallType abOpcode;
  4387.     short abResult;
  4388.     long abUserReference;
  4389.     LAPAdrBlock lapAddress;
  4390.     short lapReqCount;
  4391.     short lapActCount;
  4392.     Ptr lapDataPtr;
  4393. };
  4394.  
  4395. typedef struct ATLAPRec ATLAPRec;
  4396. typedef ATLAPRec *ATLAPRecPtr, **ATLAPRecHandle;
  4397. æC 
  4398.  
  4399. æKY ATDDPRec
  4400. ATDDPRecPtr
  4401. ATDDPRecHandle
  4402. æFc AppleTalk.h
  4403. æT struct
  4404. æD struct ATDDPRec {
  4405.     ABCallType abOpcode;
  4406.     short abResult;
  4407.     long abUserReference;
  4408.     short ddpType;
  4409.     short ddpSocket;
  4410.     AddrBlock ddpAddress;
  4411.     short ddpReqCount;
  4412.     short ddpActCount;
  4413.     Ptr ddpDataPtr;
  4414.     short ddpNodeID;
  4415. };
  4416.  
  4417. typedef struct ATDDPRec ATDDPRec;
  4418. typedef ATDDPRec *ATDDPRecPtr, **ATDDPRecHandle;
  4419. æC 
  4420.  
  4421. æKY ATNBPRec
  4422. ATNBPRecPtr
  4423. ATNBPRecHandle
  4424. æFc AppleTalk.h
  4425. æT struct
  4426. æD struct ATNBPRec {
  4427.     ABCallType abOpcode;
  4428.     short abResult;
  4429.     long abUserReference;
  4430.     EntityPtr nbpEntityPtr;
  4431.     Ptr nbpBufPtr;
  4432.     short nbpBufSize;
  4433.     short nbpDataField;
  4434.     AddrBlock nbpAddress;
  4435.     RetransType nbpRetransmitInfo;
  4436. };
  4437.  
  4438. typedef struct ATNBPRec ATNBPRec;
  4439. typedef ATNBPRec *ATNBPRecPtr, **ATNBPRecHandle;
  4440. æC 
  4441.  
  4442. æKY ATATPRec
  4443. ATATPRecPtr
  4444. ATATPRecHandle
  4445. æFc AppleTalk.h
  4446. æT struct
  4447. æD struct ATATPRec {
  4448.     ABCallType abOpcode;
  4449.     short abResult;
  4450.     long abUserReference;
  4451.     short atpSocket;
  4452.     AddrBlock atpAddress;
  4453.     short atpReqCount;
  4454.     Ptr atpDataPtr;
  4455.     BDSPtr atpRspBDSPtr;
  4456.     BitMapType atpBitMap;
  4457.     short atpTransID;
  4458.     short atpActCount;
  4459.     long atpUserData;
  4460.     Boolean atpXO;
  4461.     Boolean atpEOM;
  4462.     short atpTimeOut;
  4463.     short atpRetries;
  4464.     short atpNumBufs;
  4465.     short atpNumRsp;
  4466.     short atpBDSSize;
  4467.     long atpRspUData;
  4468.     Ptr atpRspBuf;
  4469.     short atpRspSize;
  4470. };
  4471.  
  4472. typedef struct ATATPRec ATATPRec;
  4473. typedef ATATPRec *ATATPRecPtr, **ATATPRecHandle;
  4474. æC 
  4475.  
  4476. æKY AFPCommandBlock
  4477. æFc AppleTalk.h
  4478. æT struct
  4479. æD typedef struct {
  4480.     char cmdByte;
  4481.     char startEndFlag;
  4482.     short forkRefNum;
  4483.     long rwOffset;
  4484.     long reqCount;
  4485.     char newLineFlag;
  4486.     char newLineChar;
  4487. }AFPCommandBlock;
  4488.  
  4489. æC 
  4490.  
  4491. æKY XPPPBHeader
  4492. æFc AppleTalk.h
  4493. æT struct
  4494. æD #define XPPPBHeader \
  4495.     QElem *qLink;\
  4496.     short qType;\
  4497.     short ioTrap;\
  4498.     Ptr ioCmdAddr;\
  4499.     ProcPtr ioCompletion;\
  4500.     OSErr ioResult;\
  4501.     long cmdResult;\
  4502.     short ioVRefNum;\
  4503.     short ioRefNum;\
  4504.     short csCode;
  4505. æC 
  4506.  
  4507. æKY XPPPrmBlk
  4508. æFc AppleTalk.h
  4509. æT struct
  4510. æD typedef struct {
  4511.     XPPPBHeader
  4512.     short sessRefnum; /*Offset to session refnum*/
  4513.     char aspTimeout; /*Timeout for ATP*/
  4514.     char aspRetry; /*Retry count for ATP*/
  4515.     short cbSize; /*Command block size*/
  4516.     Ptr cbPtr; /*Command block pointer*/
  4517.     short rbSize; /*Reply buffer size*/
  4518.     Ptr rbPtr; /*Reply buffer pointer*/
  4519.     short wdSize; /*Write Data size*/
  4520.     Ptr wdPtr; /*Write Data pointer*/
  4521.     char ccbStart[296]; /*CCB memory allocated for driver afpWrite max size(CCB)=296 all other calls=150*/
  4522. }XPPPrmBlk;
  4523.  
  4524. æC 
  4525.  
  4526. æKY AFPLoginPrm
  4527. æFc AppleTalk.h
  4528. æT struct
  4529. æD typedef struct {
  4530.     XPPPBHeader 
  4531.     short sessRefnum; /*Offset to session refnum */
  4532.     char aspTimeout; /*Timeout for ATP */
  4533.     char aspRetry; /*Retry count for ATP */
  4534.     short cbSize; /*Command block size */
  4535.     Ptr cbPtr; /*Command block pointer */
  4536.     short rbSize; /*Reply buffer size */
  4537.     Ptr rbPtr; /*Reply buffer pointer */
  4538.     AddrBlock afpAddrBlock; /*block in AFP login */
  4539.     Ptr afpSCBPtr; /*SCB pointer in AFP login */
  4540.     Ptr afpAttnRoutine; /*routine pointer in AFP login */
  4541.     char ccbFill[144]; /*CCB memory allocated for driver  Login needs only 150 bytes BUT CCB really starts in the middle of AFPSCBPtr and also clobbers AFPAttnRoutine. */
  4542. }AFPLoginPrm;
  4543.  
  4544. æC 
  4545.  
  4546. æKY ASPOpenPrm
  4547. ASPOpenPrmPtr
  4548. æFc AppleTalk.h
  4549. æT struct
  4550. æD typedef struct {
  4551.     XPPPBHeader 
  4552.     short sessRefnum; /*Offset to session refnum */
  4553.     char aspTimeout; /*Timeout for ATP */
  4554.     char aspRetry; /*Retry count for ATP */
  4555.     AddrBlock serverAddr; /*Server address block */
  4556.     Ptr scbPointer; /*SCB pointer */
  4557.     Ptr attnRoutine; /*Attention routine pointer*/
  4558. }ASPOpenPrm;
  4559.  
  4560. typedef ASPOpenPrm *ASPOpenPrmPtr;
  4561. æC 
  4562.  
  4563. æKY ASPAbortPrm
  4564. æFc AppleTalk.h
  4565. æT struct
  4566. æD typedef struct {
  4567.     XPPPBHeader
  4568.     Ptr abortSCBPtr; /*SCB pointer for AbortOS */
  4569. }ASPAbortPrm;
  4570.  
  4571. æC 
  4572.  
  4573. æKY ASPGetparmsBlk
  4574. æFc AppleTalk.h
  4575. æT struct
  4576. æD typedef struct {
  4577.     XPPPBHeader
  4578.     short aspMaxCmdSize; /*For SPGetParms*/
  4579.     short aspQuantumSize;
  4580.     short numSesss;
  4581. }ASPGetparmsBlk;
  4582.  
  4583. æC 
  4584.  
  4585. æKY XCallParam
  4586. æFc AppleTalk.h
  4587. æT struct
  4588. æD typedef struct {
  4589.     XPPPBHeader 
  4590.     short xppSubCode;
  4591.     char xppTimeout; /*retry interval (seconds)*/
  4592.     char xppRetry; /*retry count*/
  4593.     short filler1;
  4594.     Ptr zipBuffPtr; /*pointer to buffer (must be 578 bytes)*/
  4595.     short zipNumZones; /*no. of zone names in this response*/
  4596.     char zipLastFlag; /*non-zero if no more zones*/
  4597.     char filler2; /*filler*/
  4598.     char zipInfoField[70]; /*on initial call, set first word to zero*/
  4599. }XCallParam;
  4600.  
  4601. æC 
  4602.  
  4603. æKY WDSElement
  4604. æFc AppleTalk.h
  4605. æT struct
  4606. æD typedef struct {
  4607.     short entryLength;
  4608.     Ptr entryPtr;
  4609. }WDSElement;
  4610.  
  4611. æC 
  4612.  
  4613. æKY NTElement
  4614. æFc AppleTalk.h
  4615. æT struct
  4616. æD typedef struct {
  4617.     AddrBlock nteAddress; /*network address of entity*/
  4618.     char filler;
  4619.     char entityData[99]; /*Object, Type & Zone*/
  4620. }NTElement;
  4621.  
  4622. æC 
  4623.  
  4624. æKY NamesTableEntry
  4625. æFc AppleTalk.h
  4626. æT struct
  4627. æD typedef struct {
  4628.     Ptr qNext; /*ptr to next NTE*/
  4629.     NTElement nt;
  4630. }NamesTableEntry;
  4631.  
  4632. æC 
  4633.  
  4634. æKY MPPATPHeader
  4635. æFc AppleTalk.h
  4636. æT struct
  4637. æD #define MPPATPHeader \
  4638.     QElem *qLink;                /*next queue entry*/\
  4639.     short qType;                /*queue type*/\
  4640.     short ioTrap;                /*routine trap*/\
  4641.     Ptr ioCmdAddr;                /*routine address*/\
  4642.     ProcPtr ioCompletion;        /*completion routine*/\
  4643.     OSErr ioResult;             /*result code*/\
  4644.     long userData;                /*Command result (ATP user bytes)*/\
  4645.     short reqTID;                /*request transaction ID*/\
  4646.     short ioRefNum;             /*driver reference number*/\
  4647.     short csCode;                /*Call command code*/
  4648. æC 
  4649.  
  4650. æKY MPPparms
  4651. æFc AppleTalk.h
  4652. æT struct
  4653. æD typedef struct {
  4654.     MPPATPHeader
  4655. }MPPparms;
  4656.  
  4657. æC 
  4658.  
  4659. æKY LAPparms
  4660. æFc AppleTalk.h
  4661. æT struct
  4662. æD typedef struct {
  4663.     MPPATPHeader 
  4664.     char protType; /*ALAP protocol Type */
  4665.     char filler;
  4666.     union {
  4667.     Ptr wdsPointer; /*-> write data structure*/
  4668.     Ptr handler; /*-> protocol handler routine*/
  4669.     } LAPptrs;
  4670. }LAPparms;
  4671.  
  4672. æC 
  4673.  
  4674. æKY DDPparms
  4675. æFc AppleTalk.h
  4676. æT struct
  4677. æD typedef struct {
  4678.     MPPATPHeader 
  4679.     char socket; /*socket number */
  4680.     char checksumFlag; /*check sum flag */
  4681.     union {
  4682.     Ptr wdsPointer; /*-> write data structure*/
  4683.     Ptr listener; /*->write data structure or -> Listener*/
  4684.     } DDPptrs;
  4685. }DDPparms;
  4686.  
  4687. æC 
  4688.  
  4689. æKY NBPparms
  4690. æFc AppleTalk.h
  4691. æT struct
  4692. æD typedef struct {
  4693.     MPPATPHeader 
  4694.     char interval; /*retry interval */
  4695.     char count; /*retry count */
  4696.     union {
  4697.     Ptr ntQElPtr;
  4698.     Ptr entityPtr;
  4699.     } NBPPtrs;
  4700.     union {
  4701.     char verifyFlag;
  4702.     struct {
  4703.     Ptr retBuffPtr;
  4704.     short retBuffSize;
  4705.     short maxToGet;
  4706.     short numGotten;
  4707.     } Lookup;
  4708.     struct {
  4709.     AddrBlock confirmAddr;
  4710.     char newSocket;
  4711.     } Confirm;
  4712.     } parm;
  4713. }NBPparms;
  4714.  
  4715. æC 
  4716.  
  4717. æKY SetSelfparms
  4718. æFc AppleTalk.h
  4719. æT struct
  4720. æD typedef struct {
  4721.     MPPATPHeader 
  4722.     char newSelfFlag; /*self-send toggle flag */
  4723.     char oldSelfFlag; /*previous self-send state */
  4724. }SetSelfparms;
  4725.  
  4726. æC 
  4727.  
  4728. æKY NBPKillparms
  4729. æFc AppleTalk.h
  4730. æT struct
  4731. æD typedef struct {
  4732.     MPPATPHeader
  4733.     Ptr nKillQEl; /*ptr to i/o queue element to cancel */
  4734. }NBPKillparms;
  4735.  
  4736. æC 
  4737.  
  4738. æKY GetAppleTalkInfoParm
  4739. æFc AppleTalk.h
  4740. æT struct
  4741. æD typedef struct {
  4742.     MPPATPHeader  /*max. concurrent NBP requests*/
  4743.     short version; /*requested info version*/
  4744.     Ptr varsPtr; /*pointer to well known MPP vars*/
  4745.     Ptr DCEPtr; /*pointer to MPP DCE*/
  4746.     short portID; /*port number [0..7]*/
  4747.     long configuration; /*32-bit configuration word*/
  4748.     short selfSend; /*non zero if SelfSend enabled*/
  4749.     short netLo; /*low value of network range*/
  4750.     short netHi; /*high value of network range*/
  4751.     long ourAdd; /*our 24-bit AppleTalk address*/
  4752.     long routerAddr; /*24-bit address of (last) router*/
  4753.     short numOfPHs; /*max. number of protocol handlers*/
  4754.     short numOfSkts; /*max. number of static sockets*/
  4755.     short numNBPEs; /*max. concurrent NBP requests*/
  4756.     Ptr nTQueue; /*pointer to registered name queue*/
  4757.     short LAlength; /*length in bytes of data link addr*/
  4758.     Ptr linkAddr; /*data link address returned*/
  4759.     Ptr zoneName; /*zone name returned*/
  4760. }GetAppleTalkInfoParm;
  4761.  
  4762. æC 
  4763.  
  4764. æKY ATalkClosePrepParm
  4765. æFc AppleTalk.h
  4766. æT struct
  4767. æD typedef struct {
  4768.     MPPATPHeader
  4769.     Ptr appName; /*pointer to application name in buffer*/
  4770. }ATalkClosePrepParm;
  4771.  
  4772. æC 
  4773.  
  4774. æKY MPPParamBlock
  4775. MPPPBPtr
  4776. æFc AppleTalk.h
  4777. æT struct
  4778. æD typedef union {
  4779.     MPPparms MPP; /*General MPP parms*/
  4780.     LAPparms LAP; /*ALAP calls*/
  4781.     DDPparms DDP; /*DDP calls*/
  4782.     NBPparms NBP; /*NBP calls*/
  4783.     SetSelfparms SETSELF ;
  4784.     NBPKillparms NBPKILL ;
  4785.     GetAppleTalkInfoParm GAIINFO;
  4786.     ATalkClosePrepParm ATALKCLOSE;
  4787. }MPPParamBlock;
  4788.  
  4789. typedef MPPParamBlock *MPPPBPtr;
  4790. æC 
  4791.  
  4792. æKY MOREATPHeader
  4793. æFc AppleTalk.h
  4794. æT struct
  4795. æD #define MOREATPHeader \
  4796.     char atpSocket; /*currbitmap for requests or ATP socket number*/\
  4797.     char atpFlags; /*control information*/\
  4798.     AddrBlock addrBlock; /*source/dest. socket address*/\
  4799.     short reqLength; /*request/response length*/\
  4800.     Ptr reqPointer; /*->request/response Data*/\
  4801.     Ptr bdsPointer; /*->response BDS */
  4802.  
  4803. æC 
  4804.  
  4805. æKY ATPparms
  4806. æFc AppleTalk.h
  4807. æT struct
  4808. æD typedef struct {
  4809.     MPPATPHeader
  4810.     MOREATPHeader
  4811. }ATPparms;
  4812.  
  4813. æC 
  4814.  
  4815. æKY SendReqparms
  4816. æFc AppleTalk.h
  4817. æT struct
  4818. æD typedef struct {
  4819.     MPPATPHeader 
  4820.     MOREATPHeader 
  4821.     char filler; /*numOfBuffs */
  4822.     char timeOutVal; /*timeout interval */
  4823.     char numOfResps; /*number of responses actually received */
  4824.     char retryCount; /*number of retries */
  4825.     short intBuff; /*used internally for NSendRequest */
  4826.     char TRelTime;
  4827. }SendReqparms;
  4828.  
  4829. æC 
  4830.  
  4831. æKY ATPmisc1
  4832. æFc AppleTalk.h
  4833. æT struct
  4834. æD typedef struct {
  4835.     MPPATPHeader 
  4836.     MOREATPHeader 
  4837.     union {
  4838.     char bitMap; /*bitmap received */
  4839.     char numOfBuffs; /*number of responses being sent*/
  4840.     char rspNum; /*sequence number*/
  4841.     } u0;
  4842. }ATPmisc1;
  4843.  
  4844. æC 
  4845.  
  4846. æKY ATPmisc2
  4847. æFc AppleTalk.h
  4848. æT struct
  4849. æD typedef struct {
  4850.     MPPATPHeader 
  4851.     MOREATPHeader 
  4852.     char filler;
  4853.     char bdsSize; /*number of BDS elements */
  4854.     short transID; /*transaction ID recd. */
  4855. }ATPmisc2;
  4856.  
  4857. æC 
  4858.  
  4859. æKY Killparms
  4860. æFc AppleTalk.h
  4861. æT struct
  4862. æD typedef struct {
  4863.     MPPATPHeader
  4864.     MOREATPHeader
  4865.     Ptr aKillQEl; /*ptr to i/o queue element to cancel*/
  4866. }Killparms;
  4867.  
  4868. æC 
  4869.  
  4870. æKY ATPParamBlock
  4871. ATPPBPtr
  4872. æFc AppleTalk.h
  4873. æT struct
  4874. æD typedef union {
  4875.     ATPparms ATP; /*General ATP parms*/
  4876.     SendReqparms SREQ; /*sendrequest parms*/
  4877.     ATPmisc1 OTH1; /*and a few others*/
  4878.     ATPmisc2 OTH2; /*and a few others*/
  4879.     Killparms KILL; /*and a few others */
  4880. }ATPParamBlock;
  4881.  
  4882. typedef ATPParamBlock *ATPPBPtr;
  4883. æC 
  4884.  
  4885. æKY XPPParamBlock
  4886. XPPParmBlkPtr
  4887. æFc AppleTalk.h
  4888. æT struct
  4889. æD typedef union {
  4890.     XPPPrmBlk XPP;
  4891.     ASPGetparmsBlk GETPARM;
  4892.     ASPAbortPrm ABORT;
  4893.     ASPOpenPrm OPEN;
  4894.     AFPLoginPrm LOGIN;
  4895.     XCallParam XCALL;
  4896. }XPPParamBlock;
  4897.  
  4898. typedef XPPParamBlock *XPPParmBlkPtr;
  4899. æC 
  4900.  
  4901. æKY OpenXPP
  4902. æFc AppleTalk.h
  4903. æT Function
  4904. æD pascal OSErr OpenXPP(short *xppRefnum); 
  4905. æDT OSErr myVariable = OpenXPP((short *) xppRefnum);
  4906. æRI æRI 
  4907. æC 
  4908. »Opening the .XPP Driver
  4909.  
  4910. To open the .XPP driver, issue a Device Manager Open call.  (Refer to the Device
  4911. Manager chapter.)  The name of the .XPP driver is '.XPP'.  The original Macintosh
  4912. ROMs require that .XPP be opened only once. With new ROMs, the .XPP unit number can
  4913. always be obtained through an Open call.  With old ROMs only, the .XPP unit number
  4914. must be hard coded to XPPUnitNum (40) since only one Open call can be issued to the
  4915. driver.
  4916.  
  4917. The .XPP driver cannot be opened unless AppleTalk is open.  The application must
  4918. ensure that the .MPP and .ATP drivers are opened, as described earlier in this chapter.
  4919.  
  4920. The xppLoaded bit (bit 5) in the PortBUse byte in low memory indicates whether or not
  4921. the .XPP driver is open.
  4922.  
  4923. »Example
  4924.  
  4925. The following is an example of the procedure an application might use to open the
  4926. .XPP driver.
  4927.  
  4928. ;    Routine: OpenXPP
  4929. ;
  4930. ;        Open the .XPP driver and return the driver refNum for it.
  4931. ;
  4932. ;        Exit:    D0 = error code (ccr's set)
  4933. ;                 D1 = XPP driver refNum (if no errors)
  4934. ;
  4935. ;        All other registers preserved
  4936. ;
  4937. xppUnitNum    EQU    40                 ;default XPP driver number
  4938. xppTfRNum     EQU    -(xppUnitNum+1)    ;default XPP driver refNum
  4939.  
  4940. OpenXPP
  4941.     MOVE.L    A0-A1/D2,-(SP)            ;save registers
  4942.     MOVE      ROM85,D0                  ;check ROM type byte
  4943.     BPL.S     @10                       ;branch if >=128K ROMs
  4944.     BTST      #xppLoadedBit,PortBUse    ;is the XPP driver open already?
  4945.     BEQ.S     @10                       ;if not open, then branch to Open code
  4946.     MOVE      #xppTfRNum,D1             ;else use this as driver refnum
  4947.     MOVEQ     #0,D0                     ;set noErr
  4948.     BRA.S     @90                       ;and exit
  4949. ;
  4950. ; XPP driver not open. Make an _Open call to it. If using a 128K
  4951. ; ROM machine and the driver is already open, we will make another
  4952. ; Open call to it just so we get the correct driver refNum.
  4953. ;
  4954. @10 SUB       #ioQElSize,SP             ;allocate temporary param block
  4955.     MOVE.L    SP,A0                     ;A0 -> param block
  4956.     LEA       XPPName, A1               ;A1 -> XPP (ASP/AFP) driver name
  4957.     MOVE.L    A1,ioFileName(A0)         ;driver name into param block
  4958.     CLR.B     ioPermssn(A0)             ;clear permissions byte
  4959.     _Open
  4960.     MOVE      ioRefNum(A0),D1           ;D1=driver refNum (invalid if error)
  4961.     ADD       #ioQElSize,SP             ;deallocate temp param block
  4962. @90 MOVE.L    (SP)+,A0-A1/D2            ;restore registers
  4963.     TST       D0                        ;error? (set ccr's)
  4964.     RTS
  4965.     
  4966. XPPName  DC.B  4                        ;length of string
  4967.          DC.B  '.XPP'                   ;driver name
  4968.  
  4969. From Pascal, XPP can be opened through the OpenXPP call, which returns the driver’s
  4970. reference number:
  4971.  
  4972. FUNCTION OpenXPP (VAR xppRefnum: INTEGER) : OSErr;
  4973.  
  4974. »Open Errors
  4975.  
  4976. Errors returned when calling the Device Manager Open routine if the function does not
  4977. execute properly include the following:
  4978.  
  4979.   •  errors returned by System
  4980.   •  portInUse is returned if the AppleTalk port is in use by a driver
  4981.      other than AppleTalk or if AppleTalk is not open.
  4982.  
  4983. »Closing the .XPP Driver
  4984.  
  4985. To close the .XPP driver, call the Device Manager Close routine.
  4986.  
  4987. Warning:  There is generally no reason to close the driver.  Use this
  4988.           call sparingly, if at all.  This call should generally be used
  4989.           only by system-level applications.
  4990.  
  4991. »Close Errors
  4992.  
  4993. Errors returned when calling the Device Manager Close routine if the function does
  4994. not execute properly include the following:
  4995.  
  4996.   •  errors returned by System
  4997.   •  closeErr (new ROMs only) is returned if you try to close the driver
  4998.      and there are sessions active through that driver.  When sessions are
  4999.      active, closeErr is returned and the driver remains open.
  5000.   •  on old ROMs the driver is closed whether or not sessions are active
  5001.      and no error is returned. Results are unpredictable if sessions are
  5002.      still active.
  5003.  
  5004. »Session Control Block
  5005.  
  5006. The session control block (SCB) is a nonrelocatable block of data passed by the
  5007. caller to XPP upon session opening. XPP reserves this block for use in maintaining an
  5008. open session.   The SCB size is defined by the constant scbMemSize.  The SCB is a
  5009. locked block, and as long as the session is open, the SCB cannot be modified in any
  5010. way by the application.  There is one SCB for each open session. This block can be
  5011. reused once a CloseSess call is issued and completed for that session or when the
  5012. session is indicated as closed.
  5013.     
  5014.  
  5015. æKY ASPOpenSession
  5016. æFc AppleTalk.h
  5017. æT Function
  5018. æD pascal OSErr ASPOpenSession(ASPOpenPrmPtr thePBptr,Boolean async); 
  5019. æDT OSErr myVariable = ASPOpenSession((ASPOpenPrmPtr) thePBptr,(Boolean) async);
  5020. æRI V-536
  5021. æC 
  5022. »AppleTalk Session Protocol Functions
  5023.  
  5024. This section contains descriptions of the .XPP driver functions that you can call. 
  5025. Each function description shows the required parameter block fields, their offsets
  5026. within the parameter block and a brief definition of the field.  Possible result
  5027. codes are also described.
  5028.  
  5029. »Note on Result Codes
  5030.  
  5031. An important distinction exists between the aspParamErr and aspSessClose  result
  5032. codes that may be returned by the .XPP driver.
  5033.  
  5034. When the driver returns aspParamErr to a call that takes as an input a session reference
  5035. number, the session reference number does not relate to a valid open session.  There
  5036. could be several reasons for this, such as the workstation or server end closed the
  5037. session or the server end of the session died.
  5038.  
  5039. The aspSessClosed result code indicates that even though the session reference number
  5040. relates to a valid session, that particular session is in the process of closing down
  5041. (although  the session is not yet closed).
  5042.  
  5043. FUNCTION ASPOpenSession (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5044.  
  5045. Parameter block
  5046.   -->    26    csCode       word       Always ASPOpenSess
  5047.   -->    28    sessRefnum   word       Session reference number
  5048.   -->    30    aspTimeout   byte       Retry interval in seconds
  5049.   -->    31    aspRetry     byte       Number of retries
  5050.   -->    32    serverAddr   long word  Server socket address
  5051.   -->    36    scbPointer   pointer    Pointer to session control block
  5052.   -->    40    attnRoutine  pointer    Pointer to attention routine
  5053.  
  5054. ASPOpenSession initiates (opens) a session between the workstation and a server.  The
  5055. required parameter block is shown above.  A brief definition of the fields follows.
  5056.  
  5057. SessRefnum is a unique number identifying the open session between the workstation
  5058. and the server.  The SessRefnum is returned when the function completes successfully
  5059. and is used in all calls to identify the session.
  5060.  
  5061. ASPTimeOut is the interval in seconds between retries of the open session request.
  5062.  
  5063. ASPRetry is the number of retries that will be attempted.
  5064.  
  5065. ServerAddr is the network identifier or address of the socket on which the server is
  5066. listening.
  5067.  
  5068. SCBPointer points to a nonrelocatable block of data for the session control block
  5069. (SCB) that the .XPP driver reserves for use in maintaining an open session.   The SCB
  5070. size is defined by the constant scbMemSize.  The SCB is a locked block and as long as
  5071. the session is open, the SCB cannot be modified in any way by the application.  There
  5072. is one SCB for each open session.  This block can be reused when a CloseSess call is
  5073. issued and completed for that session, or when the session is indicated as closed
  5074. through return of aspParamErr as the result of a call for that session.
  5075.  
  5076. AttnRoutine is a pointer to a routine that is invoked if an attention from the server
  5077. is received, or upon session closing.  If this pointer is equal to zero, no attention
  5078. routine will be invoked.
  5079.  
  5080. Result codes    aspNoMoreSess    Driver cannot support another session
  5081.                 aspParamErr      Server returned bad (positive) error code    
  5082.                 aspNoServers     No servers at that address, or the server
  5083.                                  did not respond to the request
  5084.                 reqAborted       OpenSess was aborted by an AbortOS
  5085.                 aspBadVersNum    Server cannot support the offered 
  5086.                                  version number
  5087.                 aspServerBusy    Server cannot open another session
  5088.  
  5089. Note: The number of sessions that the driver is capable of supporting
  5090.       depends on the machine that the driver is running on. 
  5091.  
  5092. æKY ASPCloseSession
  5093. æFc AppleTalk.h
  5094. æT Function
  5095. æD pascal OSErr ASPCloseSession(XPPParmBlkPtr thePBptr,Boolean async); 
  5096. æDT OSErr myVariable = ASPCloseSession((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5097. æRI V-537
  5098. æC  
  5099. Parameter block
  5100.   -->    26    csCode      word  Always ASPCloseSession
  5101.   -->    28    sessRefnum  word  Session reference number
  5102.  
  5103. ASPCloseSession closes the session identified by the sessRefnum returned in the
  5104. ASPOpenSession call.  ASPCloseSession aborts any calls that are active on the session,
  5105. closes the session, and calls the attention routine, if any, with an attention code
  5106. of zero (zero is invalid as a real attention code).
  5107.  
  5108. Result codes    aspParamErr      Parameter error, indicates an invalid
  5109.                                  session reference number
  5110.                 aspSessClosed    Session already in process of closing
  5111.  
  5112. æKY ASPAbortOS
  5113. æFc AppleTalk.h
  5114. æT Function
  5115. æD pascal OSErr ASPAbortOS(XPPParmBlkPtr thePBptr,Boolean async); 
  5116. æDT OSErr myVariable = ASPAbortOS((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5117. æRI V-537
  5118. æC  
  5119. Parameter block
  5120.   -->    26    csCode            word     Always ASPAbortOS
  5121.   -->    28    abortSCBPointer   pointer  Pointer to session control block
  5122.  
  5123. ASPAbortOS aborts a pending (not yet completed) ASPOpenSession call.  The aborted
  5124. ASPOpenSession call will return a reqAborted error.
  5125.  
  5126. AbortSCBPointer points to the original SCB used in the the pending ASPOpenSession
  5127. call.
  5128.  
  5129. Result codes    cbNotFound    SCB not found, no outstanding open session
  5130.                               to be aborted.
  5131.                               Pointer did not point to an open session SCB.
  5132.  
  5133. æKY ASPGetParms
  5134. æFc AppleTalk.h
  5135. æT Function
  5136. æD pascal OSErr ASPGetParms(XPPParmBlkPtr thePBptr,Boolean async); 
  5137. æDT OSErr myVariable = ASPGetParms((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5138. æRI V-538
  5139. æC  
  5140. Parameter block
  5141.   -->    26    csCode          word  Always ASPGetParms
  5142.   -->    28    aspMaxCmdSize   word  Maximum size of command block
  5143.   -->    30    aspQuantumSize  word  Maximum data size
  5144.   -->    32    numSesss        word  Number of sessions
  5145.  
  5146. ASPGetParms returns three ASP parameters.  This call does not require an open session.
  5147.  
  5148. ASPMaxCmdSize is the maximum size of a command that can be sent to the server.
  5149.  
  5150. ASPQuantumSize is the maximum size of data that can be transferred to the server in a
  5151. Write request or from the server in a command reply.
  5152.  
  5153. NumSess is the number of concurrent sessions supported by the driver.
  5154.  
  5155. æKY ASPCloseAll
  5156. æFc AppleTalk.h
  5157. æT Function
  5158. æD pascal OSErr ASPCloseAll(XPPParmBlkPtr thePBptr,Boolean async); 
  5159. æDT OSErr myVariable = ASPCloseAll((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5160. æRI V-538
  5161. æC  
  5162. Parameter block
  5163.   -->    26    csCode  word  Always ASPCloseAll
  5164.  
  5165. ASPCloseAll closes every session that the driver has active, aborting all active
  5166. requests and invoking the attention routines where provided.  This call should be
  5167. used carefully.  ASPCloseAll can be used as a system level resource for making sure
  5168. all sessions are closed prior to closing the driver.
  5169.  
  5170. æKY ASPUserWrite
  5171. æFc AppleTalk.h
  5172. æT Function
  5173. æD pascal OSErr ASPUserWrite(XPPParmBlkPtr thePBptr,Boolean async); 
  5174. æDT OSErr myVariable = ASPUserWrite((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5175. æRI V-538
  5176. æC  
  5177. Parameter block
  5178.   -->    18    cmdResult   long word  ASP command result
  5179.   -->    26    csCode      word       Always UserWrite
  5180.   -->    28    sessRefnum  word       Session reference number
  5181.   -->    30    aspTimeout  byte       Retry interval in seconds
  5182.   -->    32    cbSize      word       Command block size
  5183.   -->    34    cbPtr       pointer    Command block pointer
  5184.   <->    38    rbSize      word       Reply buffer size and reply size
  5185.   -->    40    rbPtr       pointer    Reply buffer pointer
  5186.   <->    44    wdSize      word       Write data size
  5187.   -->    46    wdPtr       pointer    Write data pointer
  5188.   -->    50    ccbStart    record     Start of memory for CCB
  5189.  
  5190. ASPUserWrite transfers data on a session.  ASPUserWrite is one of the two main calls
  5191. that can be used to transfer data on an ASP session.  The other call that performs a
  5192. similar data transfer  is ASPUserCommand described below.  The ASPUserWrite command
  5193. returns data in two different places.  Four bytes of data are returned in the cmdResult
  5194. field and a variable size reply buffer is also returned.
  5195.  
  5196. CmdResult is four bytes of data returned by the server.
  5197.  
  5198. SessRefnum is the session reference number returned in the ASPOpenSession call.
  5199.  
  5200. ASPTimeOut is the interval in seconds between retries of the call.  Notice that there
  5201. is no aspRetry field (retries are infinite).  The command will be retried at the
  5202. prescribed interval until completion or the session is closed.
  5203.  
  5204. CBSize is the size in bytes of the command data that is to be written on the session.
  5205.  The size of the command block must not exceed the value of aspMaxCmdSize returned by
  5206. the ASPGetParms call. Note that this buffer is not the data to be written by the
  5207. command but only the data of the command itself.
  5208.  
  5209. CBPtr points to the command data.
  5210.  
  5211. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5212. command.  RBSize is also returned and indicates the size of the reply that was actually
  5213. returned.
  5214.  
  5215. RBPtr points to the reply buffer.
  5216.  
  5217. WDSize is passed and indicates the size of the write data in bytes to be sent by the
  5218. command.  WDSize is also returned and indicates the size of the write data that was
  5219. actually written.
  5220.  
  5221. WDPointer points to the write data buffer.
  5222.  
  5223. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5224. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5225. the exact requirement, refer to the CCB Sizes section of this document.
  5226.  
  5227. Result codes     aspParamErr       Invalid session number, session has
  5228.                                    been closed
  5229.                  aspSizeErr        Command block size is bigger than MaxCmdSize
  5230.                  aspSessClosed     Session is closing
  5231.                  aspBufTooSmall    Reply is bigger than response buffer;
  5232.                                    the buffer will be filled, data will
  5233.                                    be truncated
  5234.  
  5235. æKY ASPUserCommand
  5236. æFc AppleTalk.h
  5237. æT Function
  5238. æD pascal OSErr ASPUserCommand(XPPParmBlkPtr thePBptr,Boolean async); 
  5239. æDT OSErr myVariable = ASPUserCommand((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5240. æRI V-539
  5241. æC  
  5242. Parameter block
  5243.   -->    18    cmdResult   long word  ASP command result
  5244.   -->    26    csCode      word       Always ASPUserCommand
  5245.   -->    28    sessRefnum  word       Session number
  5246.   -->    30    aspTimeout  byte       Retry interval in seconds
  5247.   -->    32    cbSize      word       Command block size
  5248.   -->    34    cbPtr       pointer    Command block pointer
  5249.   <->    38    rbSize      word       Reply buffer and reply size
  5250.   -->    40    rbPtr       pointer    Reply buffer pointer
  5251.   -->    50    ccbStart    record     Start of memory for CCB
  5252.  
  5253. ASPUserCommand is used to send a command to the server on a session.
  5254.  
  5255. SessRefnum is the session reference number returned in the ASPOpenSession call.
  5256.  
  5257. ASPTimeOut is the interval in seconds between retries of the call.  Notice that there
  5258. is no aspRetry field (retries are infinite).  The command will be retried at the
  5259. prescribed interval until completion or the session is closed.
  5260.  
  5261. CBSize is the size in bytes of the block of data that contains the command to be sent
  5262. to the server on the session.  The size of the command block must not exceed the
  5263. value of aspMaxCmdSize returned by the ASPGetParms call.
  5264.  
  5265. CBPointer points to the block of data containing the command that is to be sent to
  5266. the server on the session.
  5267.  
  5268. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5269. command.  RBSize is also returned and indicates the size of the reply that was actually
  5270. returned.
  5271.  
  5272. RBPtr points to the reply buffer.
  5273.  
  5274. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5275. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5276. the exact requirement refer to the CCB Sizes section of this document.
  5277.  
  5278. Result codes     aspParamErr       Invalid session number, session has
  5279.                                    been closed
  5280.                  aspSizeErr        Command block size is bigger than MaxCmdSize
  5281.                  aspSessClosed     Session is closing
  5282.                  aspBufTooSmall    Reply is bigger than response buffer;
  5283.                                    the buffer will be filled, data will
  5284.                                    be truncated
  5285.  
  5286. æKY ASPGetStatus
  5287. æFc AppleTalk.h
  5288. æT Function
  5289. æD pascal OSErr ASPGetStatus(XPPParmBlkPtr thePBptr,Boolean async); 
  5290. æDT OSErr myVariable = ASPGetStatus((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5291. æRI V-540
  5292. æC  
  5293. Parameter block
  5294.   -->    26    csCode      word       Always ASPGetStatus
  5295.   -->    30    aspTimeout  byte       Retry interval in seconds
  5296.   -->    31    aspRetry    byte       Number of retries
  5297.   -->    32    serverAddr  long word  Server socket address
  5298.   <->    38    rbSize      word       Reply buffer and reply size
  5299.   -->    40    rbPtr       pointer    Reply buffer pointer
  5300.   -->    50    ccbStart    record     Start of memory for CCB
  5301.  
  5302. ASPGetStatus returns server status.  This call is also used as GetServerInfo at the
  5303. AFP level. This call is unique in that it transfers data over the network without
  5304. having a session open.  This call does not pass any data but requests that server
  5305. status be returned.
  5306.  
  5307. ASPTimeOut is the interval in seconds between retries of the call.
  5308.  
  5309. ASPRetry is the number of retries that will be attempted.
  5310.  
  5311. ServerAddr is the network identifier or address of the socket on which the server is
  5312. listening.
  5313.  
  5314. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5315. command. RBSize is also returned and indicates the size of the reply that was actually
  5316. returned.
  5317.  
  5318. RBPtr points to the reply buffer.
  5319.  
  5320. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5321. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5322. the exact requirement refer to the CCB Sizes section of this document.
  5323.  
  5324. Result codes    aspBufTooSmall    Reply is bigger than response buffer,
  5325.                                   or Replysize is bigger than ReplyBuffsize
  5326.                 aspNoServer       No response from server at address used
  5327.                                   in call
  5328.  
  5329. æKY AFPCommand
  5330. æFc AppleTalk.h
  5331. æT Function
  5332. æD pascal OSErr AFPCommand(XPPParmBlkPtr thePBptr,Boolean async); 
  5333. æDT OSErr myVariable = AFPCommand((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5334. æRI V-542
  5335. æC 
  5336. »AFPCall Function
  5337.  
  5338. The AFPCall function can have one of the following command formats.
  5339.  
  5340.   •  General
  5341.   •  Login
  5342.   •  AFPWrite
  5343.   •  AFPRead
  5344.  
  5345. »General Command Format
  5346.  
  5347. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5348.  
  5349. Parameter block
  5350.   -->    18    cmdResult   long word  AFP command result
  5351.   -->    26    csCode      word       Always AFPCall
  5352.   -->    28    sessRefnum  word       Session reference number
  5353.   -->    30    aspTimeout  byte       Retry interval in seconds
  5354.   -->    32    cbSize      word       Command buffer size
  5355.   -->    34    cbPtr       pointer    Command buffer
  5356.   <->    38    rbSize      word       Reply buffer size and reply size
  5357.   -->    40    rbPtr       pointer    Reply buffer pointer
  5358.   <->    44    wdSize      word       Write data size
  5359.   -->    46    wdPtr       pointer    Write data pointer
  5360.   -->    50    ccbStart    record     Start of memory for CCB
  5361.  
  5362. The general command format for the AFPCall function passes an AFP command to the
  5363. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  5364.   Note that from Pascal this call is referred to as AFPCommand.
  5365.  
  5366. CmdResult is four bytes of data returned from the server containing an indication of
  5367. the result of the AFP command.
  5368.  
  5369. SessRefnum is the session reference number returned in the AFPLogin call.
  5370.  
  5371. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  5372.  
  5373. CBSize is the size in bytes of the block of data that contains the command to be sent
  5374. to the server on the session. The size of the command block must not exceed the value
  5375. of aspMaxCmdSize returned by the ASPGetParms call.
  5376.  
  5377. CBPtr points to start of the block of data (command block) containing the command
  5378. that is to be sent to the server on the session.  The first byte of the command block
  5379. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  5380. the  parameters associated with the command as defined in the AFP document.
  5381.  
  5382. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5383. command. RBSize is also returned and indicates the size of the reply that was actually
  5384. returned.
  5385.  
  5386. RBPtr points to the reply buffer.
  5387.  
  5388. WDSize is the size of data to be written to the server (only used if the command is
  5389. one that is mapped to an ASPUserWrite).
  5390.  
  5391. WDPtr points to the write data buffer (only used if the command is one that is mapped
  5392. to an ASPUserWrite).
  5393.  
  5394. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5395. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5396. the exact requirement refer to the CCB Sizes section of this document.
  5397.  
  5398. Result codes    aspParamErr       Invalid session number; session has
  5399.                                   been closed
  5400.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5401.                 aspSessClosed     Session is closing
  5402.                 aspBufTooSmall    Reply is bigger than response buffer or
  5403.                                   buffer will be filled, data will be truncated
  5404.                 afpParmError      AFP command block size is equal to zero.
  5405.                                   This error will also be returned if the
  5406.                                   command byte in the command block is equal
  5407.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  5408.  
  5409. »Login Command Format
  5410.  
  5411. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  5412. Proposal.  For further information, refer to the AFP document.
  5413.  
  5414. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  5415.  
  5416. Parameter block
  5417.   -->    18    cmdResult       long word  AFP command result
  5418.   -->    26    csCode          word       Always AFPCall
  5419.   -->    28    sessRefnum      word       Session reference number
  5420.   -->    30    aspTimeout      byte       Retry interval in seconds
  5421.   -->    31    aspRetry        byte       Number of retries
  5422.   -->    32    cbSize          word       Command buffer size
  5423.   -->    34    cbPtr           pointer    Command buffer
  5424.   <->    38    rbSize          word       Reply buffer size and reply size
  5425.   -->    40    rbPtr           pointer    Reply buffer pointer
  5426.   -->    44    afpAddrBlock    long word  Server address block
  5427.   <->    48    afpSCBPtr       pointer    SCB pointer
  5428.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  5429.   -->    50    ccbStart        record     Start of command control block
  5430.  
  5431. CmdResult is four bytes of data returned from the server containing an indication of
  5432. the result of the AFP command.
  5433.  
  5434. SessRefnum is the session reference number (returned by the AFPLogin call).
  5435.  
  5436. ASPTimeOut is the interval in seconds between retries of the call.
  5437.  
  5438. ASPRetry is the number of retries that will be attempted.
  5439.  
  5440. CBSize is the size in bytes of the block data that contains the command to be sent to
  5441. the server on the session. The size of the command block must not exceed the value of
  5442. aspMaxCmdSize returned by the ASPGetParms call.
  5443.  
  5444. CBPtr points to the block of data (command block) containing the AFP login command
  5445. that is to be sent to the server on the session.  The first byte of the command block
  5446. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  5447. the parameters associated with the command.
  5448.  
  5449. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5450. command.  RBSize is also returned and indicates the size of the reply that was actually
  5451. returned.
  5452.  
  5453. RBPtr points to the reply buffer.
  5454.  
  5455. AFPServerAddr is the network identifier or address of the socket on which the server
  5456. is listening.
  5457.  
  5458. AFPSCBPointer points to a locked block of data for the session control block
  5459. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  5460. as the session is open, the SCB cannot be modified in any way by the application. 
  5461. There is one SCB for each open session.
  5462.  
  5463. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  5464. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  5465. be invoked.
  5466.  
  5467. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5468. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5469. the exact requirement refer to the CCB Sizes section later in this chapter.
  5470.  
  5471. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  5472.        fields overlap with the start of the CCB and are modified by the call.
  5473.  
  5474. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  5475.                 aspBufTooSmall    Reply is bigger than response buffer or
  5476.                                   buffer will be filled, data will be truncated
  5477.                 aspNoServer       Server not responding
  5478.                 aspServerBusy     Server cannot open another session
  5479.                 aspBadVersNum     Server cannot support the offered ASP
  5480.                                   version number
  5481.                 aspNoMoreSess     Driver cannot support another session.
  5482.  
  5483.  
  5484. »AFPWrite Command Format
  5485.  
  5486. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5487. calls that read or write a data block that is larger than a single ASP-level call is
  5488. capable of reading or writing.  The maximum number of bytes of data that can be read
  5489. or written at the ASP level is equal to quantumSize.
  5490.  
  5491. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5492.  
  5493. Parameter block
  5494.   -->    18    cmdResult   long word  AFP command result
  5495.   -->    26    csCode      word       Always AFPCall
  5496.   -->    28    sessRefnum  word       Session number
  5497.   -->    30    aspTimeout  byte       Retry interval in seconds
  5498.   -->    32    cbSize      word       Command buffer size
  5499.   -->    34    cbPtr       pointer    Command buffer
  5500.   <->    38    rbSize      word       Reply buffer size and reply size
  5501.   -->    40    rbPtr       pointer    Reply buffer pointer
  5502.   -->    44    wdSize      word       (used internally)
  5503.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  5504.   -->    50    ccbStart    record     Start of memory for CCB
  5505.  
  5506. CmdResult is four bytes of data returned from the server containing an indication of
  5507. the result of the AFP command.
  5508.  
  5509. SessRefnum is the session reference number returned in the AFPLogin call.
  5510.  
  5511. ASPTimeOut is the interval in seconds between retries of the call.
  5512.  
  5513. CBSize is the size in bytes of the block data that contains the command to be sent to
  5514. the server on the session.  The size of the command block must not exceed the value
  5515. of aspMaxCmdSize returned by the aspGetParms call.
  5516.  
  5517. CBPtr points to the block of data (see command block structure below) containing the
  5518. AFP write command that is to be sent to the server on the session.  The first byte of
  5519. the Command Block must contain the AFP write command byte.
  5520.  
  5521. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5522. command.  RBSize is also returned and indicates the size of the reply that was actually
  5523. returned.
  5524.  
  5525. RBPtr points to the reply buffer.
  5526.  
  5527. WDSize is used internally.
  5528.  
  5529. Note:  This command does not pass the write data size in the queue element
  5530.        but in the command buffer.  XPP will look for the size in that buffer.
  5531.  
  5532. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  5533. updated by XPP as it proceeds and will always point to that section of the data which
  5534. XPP is currently writing.
  5535.  
  5536. CCBStart is the start of the memory to be used by the XPP driver for the command
  5537. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5538. the exact requirement refer to the CCB Sizes section later in this chapter.
  5539.  
  5540. Command Block Structure:  The AFP write command passes several arguments to XPP in
  5541. the command buffer itself. The byte offsets are relative to the location pointed to
  5542. by cbPtr.
  5543.  
  5544.   -->    0    cmdByte       byte       AFP call command byte
  5545.   -->    1    startEndFlag  byte       Start/end Flag
  5546.   <->    4    rwOffset      long word  Offset within fork to write
  5547.   <->    8    reqCount      long word  Requested count
  5548.  
  5549. CmdByte is the AFP call command byte and must contain the AFP write command code.
  5550.  
  5551. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  5552. rwOffset field is relative to the beginning or the end of the fork (all other bits
  5553. are zero).
  5554.  
  5555.   0 = relative to the beginning of the fork
  5556.   1 = relative to the end of the fork
  5557.  
  5558. RWOffset is the byte offset within the fork at which the write is to begin.
  5559.  
  5560. ReqCount indicates the size of the data to be written and is returned as the actual
  5561. size written.
  5562.  
  5563. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  5564. always indicate the current value of these fields.
  5565.  
  5566. The Pascal structure of the AFP command buffer follows:
  5567.  
  5568. AFPCommandBlock = PACKED RECORD
  5569.                     cmdByte:       Byte;
  5570.                     startEndFlag:  Byte;
  5571.                     forkRefNum:    INTEGER;    {used by server}
  5572.                     rwOffset:      LONGINT;
  5573.                     reqCount:      LONGINT;
  5574.                     newLineFlag:   Byte;       {unused by write}
  5575.                     newLineChar:   CHAR;       {unused by write}
  5576.                   END;
  5577.  
  5578. Result codes    aspParamErr       Invalid session number
  5579.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5580.                 aspSessClosed     Session is closing
  5581.                 aspBufTooSmall    Reply is bigger than response buffer
  5582.  
  5583. »AFPRead Command Format
  5584.  
  5585. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5586. calls that read or write a data block that is larger than a single ASP-level call is
  5587. capable of reading or writing.  The maximum number of bytes of data that can be read
  5588. or written at the ASP level is equal to quantumSize.
  5589.  
  5590. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5591.  
  5592. Parameter block
  5593.   -->    18    cmdResult   long word  ASP command result
  5594.   -->    26    csCode      word       Always AFPCall
  5595.   -->    28    sessRefnum  word       Session number
  5596.   -->    30    aspTimeout  byte       Retry interval in seconds
  5597.   -->    32    cbSize      word       Command buffer size
  5598.   -->    34    cbPtr       pointer    Command buffer
  5599.   -->    38    rbSize      word       Used internally
  5600.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  5601.   -->    50    ccbStart    record     Start of memory for CCB
  5602.  
  5603. CmdResult is four bytes of data returned from the server containing an indication of
  5604. the result of the AFP command.
  5605.  
  5606. SessRefnum is the session reference number returned in the AFPLogin  call.
  5607.  
  5608. ASPTimeOut is the interval in seconds between retries of the call.
  5609.  
  5610. CBSize is the size in bytes of the block data that contains the command to be sent to
  5611. the server on the session.  The size of the command block must not exceed the value
  5612. of aspMaxCmdSize returned by the GetParms call.
  5613.  
  5614. CBPtr points to the block of data (command block) containing the AFP read command
  5615. that is to be sent to the server on the session.  The first byte of the command block
  5616. must contain the AFP read command byte.  The command block structure is shown below.
  5617.  
  5618. RBSize  is used internally.
  5619.  
  5620. Note:  This command does not pass the read size in the queue element but
  5621.        in the command buffer.  XPP will look for the size in that buffer.
  5622.  
  5623. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  5624. proceeds and will always point to that section of the buffer that XPP is currently
  5625. reading into.
  5626.  
  5627. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5628. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5629. the exact requirement refer to The CCB Sizes section later in this chapter.
  5630.  
  5631. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  5632. command buffer itself. The byte offsets are relative to the location pointed to by
  5633. cbPointer.
  5634.  
  5635.   -->    0    cmdByte      byte       AFP call command byte
  5636.   <->    4    rwOffset     long word  Offset within fork to read
  5637.   <->    8    reqCount     long word  Requested count
  5638.   -->    12   newLineFlag  byte       Newline Flag
  5639.   -->    13   newLineChar  byte       Newline Character
  5640.  
  5641. CmdByte is the AFP call command byte and must contain the AFP read command code.
  5642.  
  5643. RWOffset is the byte offset within the fork at which the read is to begin.
  5644.  
  5645. ReqCount  indicates the size of the read data buffer and is returned as the actual
  5646. size read.
  5647.  
  5648. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  5649. always indicate the current value of these fields.
  5650.  
  5651. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  5652. the read is to terminate at a specified character (all other bits are zero).
  5653.  
  5654.   0 = no Newline Character is specified
  5655.   1 = a Newline Character is specified
  5656.  
  5657. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  5658. reading the fork, causes the read operation to terminate.
  5659.  
  5660. The Pascal structure of the AFPCommand follows:
  5661.  
  5662. AFPCommandBlock = PACKED RECORD
  5663.                     cmdByte:       Byte;
  5664.                     startEndFlag:  Byte;     {unused for read}
  5665.                     forkRefNum:    INTEGER;  {used by server}
  5666.                     rwOffset:      LONGINT;
  5667.                     reqCount:      LONGINT;
  5668.                     newLineFlag:   Byte;
  5669.                     newLineChar:   CHAR;
  5670.                   END;
  5671.  
  5672. Result codes    aspParamErr       Invalid session number
  5673.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5674.                 aspSessClosed     Session is closing
  5675.                 aspBufTooSmall    Reply is bigger than response buffer
  5676.         
  5677.  
  5678. æKY GetLocalZones
  5679. æFc AppleTalk.h
  5680. æT Function
  5681. æD pascal OSErr GetLocalZones(XPPParmBlkPtr thePBptr,Boolean async); 
  5682. æDT OSErr myVariable = GetLocalZones((XPPParmBlkPtr) thePBptr,(Boolean) async);
  5683. æRI V-542
  5684. æC 
  5685. »AFPCall Function
  5686.  
  5687. The AFPCall function can have one of the following command formats.
  5688.  
  5689.   •  General
  5690.   •  Login
  5691.   •  AFPWrite
  5692.   •  AFPRead
  5693.  
  5694. »General Command Format
  5695.  
  5696. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5697.  
  5698. Parameter block
  5699.   -->    18    cmdResult   long word  AFP command result
  5700.   -->    26    csCode      word       Always AFPCall
  5701.   -->    28    sessRefnum  word       Session reference number
  5702.   -->    30    aspTimeout  byte       Retry interval in seconds
  5703.   -->    32    cbSize      word       Command buffer size
  5704.   -->    34    cbPtr       pointer    Command buffer
  5705.   <->    38    rbSize      word       Reply buffer size and reply size
  5706.   -->    40    rbPtr       pointer    Reply buffer pointer
  5707.   <->    44    wdSize      word       Write data size
  5708.   -->    46    wdPtr       pointer    Write data pointer
  5709.   -->    50    ccbStart    record     Start of memory for CCB
  5710.  
  5711. The general command format for the AFPCall function passes an AFP command to the
  5712. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  5713.   Note that from Pascal this call is referred to as AFPCommand.
  5714.  
  5715. CmdResult is four bytes of data returned from the server containing an indication of
  5716. the result of the AFP command.
  5717.  
  5718. SessRefnum is the session reference number returned in the AFPLogin call.
  5719.  
  5720. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  5721.  
  5722. CBSize is the size in bytes of the block of data that contains the command to be sent
  5723. to the server on the session. The size of the command block must not exceed the value
  5724. of aspMaxCmdSize returned by the ASPGetParms call.
  5725.  
  5726. CBPtr points to start of the block of data (command block) containing the command
  5727. that is to be sent to the server on the session.  The first byte of the command block
  5728. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  5729. the  parameters associated with the command as defined in the AFP document.
  5730.  
  5731. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5732. command. RBSize is also returned and indicates the size of the reply that was actually
  5733. returned.
  5734.  
  5735. RBPtr points to the reply buffer.
  5736.  
  5737. WDSize is the size of data to be written to the server (only used if the command is
  5738. one that is mapped to an ASPUserWrite).
  5739.  
  5740. WDPtr points to the write data buffer (only used if the command is one that is mapped
  5741. to an ASPUserWrite).
  5742.  
  5743. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5744. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5745. the exact requirement refer to the CCB Sizes section of this document.
  5746.  
  5747. Result codes    aspParamErr       Invalid session number; session has
  5748.                                   been closed
  5749.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5750.                 aspSessClosed     Session is closing
  5751.                 aspBufTooSmall    Reply is bigger than response buffer or
  5752.                                   buffer will be filled, data will be truncated
  5753.                 afpParmError      AFP command block size is equal to zero.
  5754.                                   This error will also be returned if the
  5755.                                   command byte in the command block is equal
  5756.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  5757.  
  5758. »Login Command Format
  5759.  
  5760. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  5761. Proposal.  For further information, refer to the AFP document.
  5762.  
  5763. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  5764.  
  5765. Parameter block
  5766.   -->    18    cmdResult       long word  AFP command result
  5767.   -->    26    csCode          word       Always AFPCall
  5768.   -->    28    sessRefnum      word       Session reference number
  5769.   -->    30    aspTimeout      byte       Retry interval in seconds
  5770.   -->    31    aspRetry        byte       Number of retries
  5771.   -->    32    cbSize          word       Command buffer size
  5772.   -->    34    cbPtr           pointer    Command buffer
  5773.   <->    38    rbSize          word       Reply buffer size and reply size
  5774.   -->    40    rbPtr           pointer    Reply buffer pointer
  5775.   -->    44    afpAddrBlock    long word  Server address block
  5776.   <->    48    afpSCBPtr       pointer    SCB pointer
  5777.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  5778.   -->    50    ccbStart        record     Start of command control block
  5779.  
  5780. CmdResult is four bytes of data returned from the server containing an indication of
  5781. the result of the AFP command.
  5782.  
  5783. SessRefnum is the session reference number (returned by the AFPLogin call).
  5784.  
  5785. ASPTimeOut is the interval in seconds between retries of the call.
  5786.  
  5787. ASPRetry is the number of retries that will be attempted.
  5788.  
  5789. CBSize is the size in bytes of the block data that contains the command to be sent to
  5790. the server on the session. The size of the command block must not exceed the value of
  5791. aspMaxCmdSize returned by the ASPGetParms call.
  5792.  
  5793. CBPtr points to the block of data (command block) containing the AFP login command
  5794. that is to be sent to the server on the session.  The first byte of the command block
  5795. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  5796. the parameters associated with the command.
  5797.  
  5798. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5799. command.  RBSize is also returned and indicates the size of the reply that was actually
  5800. returned.
  5801.  
  5802. RBPtr points to the reply buffer.
  5803.  
  5804. AFPServerAddr is the network identifier or address of the socket on which the server
  5805. is listening.
  5806.  
  5807. AFPSCBPointer points to a locked block of data for the session control block
  5808. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  5809. as the session is open, the SCB cannot be modified in any way by the application. 
  5810. There is one SCB for each open session.
  5811.  
  5812. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  5813. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  5814. be invoked.
  5815.  
  5816. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5817. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5818. the exact requirement refer to the CCB Sizes section later in this chapter.
  5819.  
  5820. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  5821.        fields overlap with the start of the CCB and are modified by the call.
  5822.  
  5823. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  5824.                 aspBufTooSmall    Reply is bigger than response buffer or
  5825.                                   buffer will be filled, data will be truncated
  5826.                 aspNoServer       Server not responding
  5827.                 aspServerBusy     Server cannot open another session
  5828.                 aspBadVersNum     Server cannot support the offered ASP
  5829.                                   version number
  5830.                 aspNoMoreSess     Driver cannot support another session.
  5831.  
  5832.  
  5833. »AFPWrite Command Format
  5834.  
  5835. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5836. calls that read or write a data block that is larger than a single ASP-level call is
  5837. capable of reading or writing.  The maximum number of bytes of data that can be read
  5838. or written at the ASP level is equal to quantumSize.
  5839.  
  5840. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5841.  
  5842. Parameter block
  5843.   -->    18    cmdResult   long word  AFP command result
  5844.   -->    26    csCode      word       Always AFPCall
  5845.   -->    28    sessRefnum  word       Session number
  5846.   -->    30    aspTimeout  byte       Retry interval in seconds
  5847.   -->    32    cbSize      word       Command buffer size
  5848.   -->    34    cbPtr       pointer    Command buffer
  5849.   <->    38    rbSize      word       Reply buffer size and reply size
  5850.   -->    40    rbPtr       pointer    Reply buffer pointer
  5851.   -->    44    wdSize      word       (used internally)
  5852.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  5853.   -->    50    ccbStart    record     Start of memory for CCB
  5854.  
  5855. CmdResult is four bytes of data returned from the server containing an indication of
  5856. the result of the AFP command.
  5857.  
  5858. SessRefnum is the session reference number returned in the AFPLogin call.
  5859.  
  5860. ASPTimeOut is the interval in seconds between retries of the call.
  5861.  
  5862. CBSize is the size in bytes of the block data that contains the command to be sent to
  5863. the server on the session.  The size of the command block must not exceed the value
  5864. of aspMaxCmdSize returned by the aspGetParms call.
  5865.  
  5866. CBPtr points to the block of data (see command block structure below) containing the
  5867. AFP write command that is to be sent to the server on the session.  The first byte of
  5868. the Command Block must contain the AFP write command byte.
  5869.  
  5870. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  5871. command.  RBSize is also returned and indicates the size of the reply that was actually
  5872. returned.
  5873.  
  5874. RBPtr points to the reply buffer.
  5875.  
  5876. WDSize is used internally.
  5877.  
  5878. Note:  This command does not pass the write data size in the queue element
  5879.        but in the command buffer.  XPP will look for the size in that buffer.
  5880.  
  5881. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  5882. updated by XPP as it proceeds and will always point to that section of the data which
  5883. XPP is currently writing.
  5884.  
  5885. CCBStart is the start of the memory to be used by the XPP driver for the command
  5886. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  5887. the exact requirement refer to the CCB Sizes section later in this chapter.
  5888.  
  5889. Command Block Structure:  The AFP write command passes several arguments to XPP in
  5890. the command buffer itself. The byte offsets are relative to the location pointed to
  5891. by cbPtr.
  5892.  
  5893.   -->    0    cmdByte       byte       AFP call command byte
  5894.   -->    1    startEndFlag  byte       Start/end Flag
  5895.   <->    4    rwOffset      long word  Offset within fork to write
  5896.   <->    8    reqCount      long word  Requested count
  5897.  
  5898. CmdByte is the AFP call command byte and must contain the AFP write command code.
  5899.  
  5900. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  5901. rwOffset field is relative to the beginning or the end of the fork (all other bits
  5902. are zero).
  5903.  
  5904.   0 = relative to the beginning of the fork
  5905.   1 = relative to the end of the fork
  5906.  
  5907. RWOffset is the byte offset within the fork at which the write is to begin.
  5908.  
  5909. ReqCount indicates the size of the data to be written and is returned as the actual
  5910. size written.
  5911.  
  5912. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  5913. always indicate the current value of these fields.
  5914.  
  5915. The Pascal structure of the AFP command buffer follows:
  5916.  
  5917. AFPCommandBlock = PACKED RECORD
  5918.                     cmdByte:       Byte;
  5919.                     startEndFlag:  Byte;
  5920.                     forkRefNum:    INTEGER;    {used by server}
  5921.                     rwOffset:      LONGINT;
  5922.                     reqCount:      LONGINT;
  5923.                     newLineFlag:   Byte;       {unused by write}
  5924.                     newLineChar:   CHAR;       {unused by write}
  5925.                   END;
  5926.  
  5927. Result codes    aspParamErr       Invalid session number
  5928.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  5929.                 aspSessClosed     Session is closing
  5930.                 aspBufTooSmall    Reply is bigger than response buffer
  5931.  
  5932. »AFPRead Command Format
  5933.  
  5934. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  5935. calls that read or write a data block that is larger than a single ASP-level call is
  5936. capable of reading or writing.  The maximum number of bytes of data that can be read
  5937. or written at the ASP level is equal to quantumSize.
  5938.  
  5939. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  5940.  
  5941. Parameter block
  5942.   -->    18    cmdResult   long word  ASP command result
  5943.   -->    26    csCode      word       Always AFPCall
  5944.   -->    28    sessRefnum  word       Session number
  5945.   -->    30    aspTimeout  byte       Retry interval in seconds
  5946.   -->    32    cbSize      word       Command buffer size
  5947.   -->    34    cbPtr       pointer    Command buffer
  5948.   -->    38    rbSize      word       Used internally
  5949.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  5950.   -->    50    ccbStart    record     Start of memory for CCB
  5951.  
  5952. CmdResult is four bytes of data returned from the server containing an indication of
  5953. the result of the AFP command.
  5954.  
  5955. SessRefnum is the session reference number returned in the AFPLogin  call.
  5956.  
  5957. ASPTimeOut is the interval in seconds between retries of the call.
  5958.  
  5959. CBSize is the size in bytes of the block data that contains the command to be sent to
  5960. the server on the session.  The size of the command block must not exceed the value
  5961. of aspMaxCmdSize returned by the GetParms call.
  5962.  
  5963. CBPtr points to the block of data (command block) containing the AFP read command
  5964. that is to be sent to the server on the session.  The first byte of the command block
  5965. must contain the AFP read command byte.  The command block structure is shown below.
  5966.  
  5967. RBSize  is used internally.
  5968.  
  5969. Note:  This command does not pass the read size in the queue element but
  5970.        in the command buffer.  XPP will look for the size in that buffer.
  5971.  
  5972. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  5973. proceeds and will always point to that section of the buffer that XPP is currently
  5974. reading into.
  5975.  
  5976. CCBStart is the start of the memory to be used by the .XPP driver for the command
  5977. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  5978. the exact requirement refer to The CCB Sizes section later in this chapter.
  5979.  
  5980. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  5981. command buffer itself. The byte offsets are relative to the location pointed to by
  5982. cbPointer.
  5983.  
  5984.   -->    0    cmdByte      byte       AFP call command byte
  5985.   <->    4    rwOffset     long word  Offset within fork to read
  5986.   <->    8    reqCount     long word  Requested count
  5987.   -->    12   newLineFlag  byte       Newline Flag
  5988.   -->    13   newLineChar  byte       Newline Character
  5989.  
  5990. CmdByte is the AFP call command byte and must contain the AFP read command code.
  5991.  
  5992. RWOffset is the byte offset within the fork at which the read is to begin.
  5993.  
  5994. ReqCount  indicates the size of the read data buffer and is returned as the actual
  5995. size read.
  5996.  
  5997. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  5998. always indicate the current value of these fields.
  5999.  
  6000. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  6001. the read is to terminate at a specified character (all other bits are zero).
  6002.  
  6003.   0 = no Newline Character is specified
  6004.   1 = a Newline Character is specified
  6005.  
  6006. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  6007. reading the fork, causes the read operation to terminate.
  6008.  
  6009. The Pascal structure of the AFPCommand follows:
  6010.  
  6011. AFPCommandBlock = PACKED RECORD
  6012.                     cmdByte:       Byte;
  6013.                     startEndFlag:  Byte;     {unused for read}
  6014.                     forkRefNum:    INTEGER;  {used by server}
  6015.                     rwOffset:      LONGINT;
  6016.                     reqCount:      LONGINT;
  6017.                     newLineFlag:   Byte;
  6018.                     newLineChar:   CHAR;
  6019.                   END;
  6020.  
  6021. Result codes    aspParamErr       Invalid session number
  6022.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6023.                 aspSessClosed     Session is closing
  6024.                 aspBufTooSmall    Reply is bigger than response buffer
  6025.         
  6026.  
  6027. æKY GetZoneList
  6028. æFc AppleTalk.h
  6029. æT Function
  6030. æD pascal OSErr GetZoneList(XPPParmBlkPtr thePBptr,Boolean async); 
  6031. æDT OSErr myVariable = GetZoneList((XPPParmBlkPtr) thePBptr,(Boolean) async);
  6032. æRI V-542
  6033. æC 
  6034. »AFPCall Function
  6035.  
  6036. The AFPCall function can have one of the following command formats.
  6037.  
  6038.   •  General
  6039.   •  Login
  6040.   •  AFPWrite
  6041.   •  AFPRead
  6042.  
  6043. »General Command Format
  6044.  
  6045. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6046.  
  6047. Parameter block
  6048.   -->    18    cmdResult   long word  AFP command result
  6049.   -->    26    csCode      word       Always AFPCall
  6050.   -->    28    sessRefnum  word       Session reference number
  6051.   -->    30    aspTimeout  byte       Retry interval in seconds
  6052.   -->    32    cbSize      word       Command buffer size
  6053.   -->    34    cbPtr       pointer    Command buffer
  6054.   <->    38    rbSize      word       Reply buffer size and reply size
  6055.   -->    40    rbPtr       pointer    Reply buffer pointer
  6056.   <->    44    wdSize      word       Write data size
  6057.   -->    46    wdPtr       pointer    Write data pointer
  6058.   -->    50    ccbStart    record     Start of memory for CCB
  6059.  
  6060. The general command format for the AFPCall function passes an AFP command to the
  6061. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  6062.   Note that from Pascal this call is referred to as AFPCommand.
  6063.  
  6064. CmdResult is four bytes of data returned from the server containing an indication of
  6065. the result of the AFP command.
  6066.  
  6067. SessRefnum is the session reference number returned in the AFPLogin call.
  6068.  
  6069. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  6070.  
  6071. CBSize is the size in bytes of the block of data that contains the command to be sent
  6072. to the server on the session. The size of the command block must not exceed the value
  6073. of aspMaxCmdSize returned by the ASPGetParms call.
  6074.  
  6075. CBPtr points to start of the block of data (command block) containing the command
  6076. that is to be sent to the server on the session.  The first byte of the command block
  6077. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  6078. the  parameters associated with the command as defined in the AFP document.
  6079.  
  6080. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6081. command. RBSize is also returned and indicates the size of the reply that was actually
  6082. returned.
  6083.  
  6084. RBPtr points to the reply buffer.
  6085.  
  6086. WDSize is the size of data to be written to the server (only used if the command is
  6087. one that is mapped to an ASPUserWrite).
  6088.  
  6089. WDPtr points to the write data buffer (only used if the command is one that is mapped
  6090. to an ASPUserWrite).
  6091.  
  6092. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6093. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  6094. the exact requirement refer to the CCB Sizes section of this document.
  6095.  
  6096. Result codes    aspParamErr       Invalid session number; session has
  6097.                                   been closed
  6098.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6099.                 aspSessClosed     Session is closing
  6100.                 aspBufTooSmall    Reply is bigger than response buffer or
  6101.                                   buffer will be filled, data will be truncated
  6102.                 afpParmError      AFP command block size is equal to zero.
  6103.                                   This error will also be returned if the
  6104.                                   command byte in the command block is equal
  6105.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  6106.  
  6107. »Login Command Format
  6108.  
  6109. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  6110. Proposal.  For further information, refer to the AFP document.
  6111.  
  6112. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  6113.  
  6114. Parameter block
  6115.   -->    18    cmdResult       long word  AFP command result
  6116.   -->    26    csCode          word       Always AFPCall
  6117.   -->    28    sessRefnum      word       Session reference number
  6118.   -->    30    aspTimeout      byte       Retry interval in seconds
  6119.   -->    31    aspRetry        byte       Number of retries
  6120.   -->    32    cbSize          word       Command buffer size
  6121.   -->    34    cbPtr           pointer    Command buffer
  6122.   <->    38    rbSize          word       Reply buffer size and reply size
  6123.   -->    40    rbPtr           pointer    Reply buffer pointer
  6124.   -->    44    afpAddrBlock    long word  Server address block
  6125.   <->    48    afpSCBPtr       pointer    SCB pointer
  6126.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  6127.   -->    50    ccbStart        record     Start of command control block
  6128.  
  6129. CmdResult is four bytes of data returned from the server containing an indication of
  6130. the result of the AFP command.
  6131.  
  6132. SessRefnum is the session reference number (returned by the AFPLogin call).
  6133.  
  6134. ASPTimeOut is the interval in seconds between retries of the call.
  6135.  
  6136. ASPRetry is the number of retries that will be attempted.
  6137.  
  6138. CBSize is the size in bytes of the block data that contains the command to be sent to
  6139. the server on the session. The size of the command block must not exceed the value of
  6140. aspMaxCmdSize returned by the ASPGetParms call.
  6141.  
  6142. CBPtr points to the block of data (command block) containing the AFP login command
  6143. that is to be sent to the server on the session.  The first byte of the command block
  6144. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  6145. the parameters associated with the command.
  6146.  
  6147. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6148. command.  RBSize is also returned and indicates the size of the reply that was actually
  6149. returned.
  6150.  
  6151. RBPtr points to the reply buffer.
  6152.  
  6153. AFPServerAddr is the network identifier or address of the socket on which the server
  6154. is listening.
  6155.  
  6156. AFPSCBPointer points to a locked block of data for the session control block
  6157. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  6158. as the session is open, the SCB cannot be modified in any way by the application. 
  6159. There is one SCB for each open session.
  6160.  
  6161. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  6162. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  6163. be invoked.
  6164.  
  6165. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6166. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  6167. the exact requirement refer to the CCB Sizes section later in this chapter.
  6168.  
  6169. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  6170.        fields overlap with the start of the CCB and are modified by the call.
  6171.  
  6172. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  6173.                 aspBufTooSmall    Reply is bigger than response buffer or
  6174.                                   buffer will be filled, data will be truncated
  6175.                 aspNoServer       Server not responding
  6176.                 aspServerBusy     Server cannot open another session
  6177.                 aspBadVersNum     Server cannot support the offered ASP
  6178.                                   version number
  6179.                 aspNoMoreSess     Driver cannot support another session.
  6180.  
  6181.  
  6182. »AFPWrite Command Format
  6183.  
  6184. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  6185. calls that read or write a data block that is larger than a single ASP-level call is
  6186. capable of reading or writing.  The maximum number of bytes of data that can be read
  6187. or written at the ASP level is equal to quantumSize.
  6188.  
  6189. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6190.  
  6191. Parameter block
  6192.   -->    18    cmdResult   long word  AFP command result
  6193.   -->    26    csCode      word       Always AFPCall
  6194.   -->    28    sessRefnum  word       Session number
  6195.   -->    30    aspTimeout  byte       Retry interval in seconds
  6196.   -->    32    cbSize      word       Command buffer size
  6197.   -->    34    cbPtr       pointer    Command buffer
  6198.   <->    38    rbSize      word       Reply buffer size and reply size
  6199.   -->    40    rbPtr       pointer    Reply buffer pointer
  6200.   -->    44    wdSize      word       (used internally)
  6201.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  6202.   -->    50    ccbStart    record     Start of memory for CCB
  6203.  
  6204. CmdResult is four bytes of data returned from the server containing an indication of
  6205. the result of the AFP command.
  6206.  
  6207. SessRefnum is the session reference number returned in the AFPLogin call.
  6208.  
  6209. ASPTimeOut is the interval in seconds between retries of the call.
  6210.  
  6211. CBSize is the size in bytes of the block data that contains the command to be sent to
  6212. the server on the session.  The size of the command block must not exceed the value
  6213. of aspMaxCmdSize returned by the aspGetParms call.
  6214.  
  6215. CBPtr points to the block of data (see command block structure below) containing the
  6216. AFP write command that is to be sent to the server on the session.  The first byte of
  6217. the Command Block must contain the AFP write command byte.
  6218.  
  6219. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6220. command.  RBSize is also returned and indicates the size of the reply that was actually
  6221. returned.
  6222.  
  6223. RBPtr points to the reply buffer.
  6224.  
  6225. WDSize is used internally.
  6226.  
  6227. Note:  This command does not pass the write data size in the queue element
  6228.        but in the command buffer.  XPP will look for the size in that buffer.
  6229.  
  6230. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  6231. updated by XPP as it proceeds and will always point to that section of the data which
  6232. XPP is currently writing.
  6233.  
  6234. CCBStart is the start of the memory to be used by the XPP driver for the command
  6235. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  6236. the exact requirement refer to the CCB Sizes section later in this chapter.
  6237.  
  6238. Command Block Structure:  The AFP write command passes several arguments to XPP in
  6239. the command buffer itself. The byte offsets are relative to the location pointed to
  6240. by cbPtr.
  6241.  
  6242.   -->    0    cmdByte       byte       AFP call command byte
  6243.   -->    1    startEndFlag  byte       Start/end Flag
  6244.   <->    4    rwOffset      long word  Offset within fork to write
  6245.   <->    8    reqCount      long word  Requested count
  6246.  
  6247. CmdByte is the AFP call command byte and must contain the AFP write command code.
  6248.  
  6249. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  6250. rwOffset field is relative to the beginning or the end of the fork (all other bits
  6251. are zero).
  6252.  
  6253.   0 = relative to the beginning of the fork
  6254.   1 = relative to the end of the fork
  6255.  
  6256. RWOffset is the byte offset within the fork at which the write is to begin.
  6257.  
  6258. ReqCount indicates the size of the data to be written and is returned as the actual
  6259. size written.
  6260.  
  6261. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  6262. always indicate the current value of these fields.
  6263.  
  6264. The Pascal structure of the AFP command buffer follows:
  6265.  
  6266. AFPCommandBlock = PACKED RECORD
  6267.                     cmdByte:       Byte;
  6268.                     startEndFlag:  Byte;
  6269.                     forkRefNum:    INTEGER;    {used by server}
  6270.                     rwOffset:      LONGINT;
  6271.                     reqCount:      LONGINT;
  6272.                     newLineFlag:   Byte;       {unused by write}
  6273.                     newLineChar:   CHAR;       {unused by write}
  6274.                   END;
  6275.  
  6276. Result codes    aspParamErr       Invalid session number
  6277.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6278.                 aspSessClosed     Session is closing
  6279.                 aspBufTooSmall    Reply is bigger than response buffer
  6280.  
  6281. »AFPRead Command Format
  6282.  
  6283. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  6284. calls that read or write a data block that is larger than a single ASP-level call is
  6285. capable of reading or writing.  The maximum number of bytes of data that can be read
  6286. or written at the ASP level is equal to quantumSize.
  6287.  
  6288. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6289.  
  6290. Parameter block
  6291.   -->    18    cmdResult   long word  ASP command result
  6292.   -->    26    csCode      word       Always AFPCall
  6293.   -->    28    sessRefnum  word       Session number
  6294.   -->    30    aspTimeout  byte       Retry interval in seconds
  6295.   -->    32    cbSize      word       Command buffer size
  6296.   -->    34    cbPtr       pointer    Command buffer
  6297.   -->    38    rbSize      word       Used internally
  6298.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  6299.   -->    50    ccbStart    record     Start of memory for CCB
  6300.  
  6301. CmdResult is four bytes of data returned from the server containing an indication of
  6302. the result of the AFP command.
  6303.  
  6304. SessRefnum is the session reference number returned in the AFPLogin  call.
  6305.  
  6306. ASPTimeOut is the interval in seconds between retries of the call.
  6307.  
  6308. CBSize is the size in bytes of the block data that contains the command to be sent to
  6309. the server on the session.  The size of the command block must not exceed the value
  6310. of aspMaxCmdSize returned by the GetParms call.
  6311.  
  6312. CBPtr points to the block of data (command block) containing the AFP read command
  6313. that is to be sent to the server on the session.  The first byte of the command block
  6314. must contain the AFP read command byte.  The command block structure is shown below.
  6315.  
  6316. RBSize  is used internally.
  6317.  
  6318. Note:  This command does not pass the read size in the queue element but
  6319.        in the command buffer.  XPP will look for the size in that buffer.
  6320.  
  6321. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  6322. proceeds and will always point to that section of the buffer that XPP is currently
  6323. reading into.
  6324.  
  6325. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6326. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  6327. the exact requirement refer to The CCB Sizes section later in this chapter.
  6328.  
  6329. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  6330. command buffer itself. The byte offsets are relative to the location pointed to by
  6331. cbPointer.
  6332.  
  6333.   -->    0    cmdByte      byte       AFP call command byte
  6334.   <->    4    rwOffset     long word  Offset within fork to read
  6335.   <->    8    reqCount     long word  Requested count
  6336.   -->    12   newLineFlag  byte       Newline Flag
  6337.   -->    13   newLineChar  byte       Newline Character
  6338.  
  6339. CmdByte is the AFP call command byte and must contain the AFP read command code.
  6340.  
  6341. RWOffset is the byte offset within the fork at which the read is to begin.
  6342.  
  6343. ReqCount  indicates the size of the read data buffer and is returned as the actual
  6344. size read.
  6345.  
  6346. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  6347. always indicate the current value of these fields.
  6348.  
  6349. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  6350. the read is to terminate at a specified character (all other bits are zero).
  6351.  
  6352.   0 = no Newline Character is specified
  6353.   1 = a Newline Character is specified
  6354.  
  6355. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  6356. reading the fork, causes the read operation to terminate.
  6357.  
  6358. The Pascal structure of the AFPCommand follows:
  6359.  
  6360. AFPCommandBlock = PACKED RECORD
  6361.                     cmdByte:       Byte;
  6362.                     startEndFlag:  Byte;     {unused for read}
  6363.                     forkRefNum:    INTEGER;  {used by server}
  6364.                     rwOffset:      LONGINT;
  6365.                     reqCount:      LONGINT;
  6366.                     newLineFlag:   Byte;
  6367.                     newLineChar:   CHAR;
  6368.                   END;
  6369.  
  6370. Result codes    aspParamErr       Invalid session number
  6371.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6372.                 aspSessClosed     Session is closing
  6373.                 aspBufTooSmall    Reply is bigger than response buffer
  6374.         
  6375.  
  6376. æKY GetMyZone
  6377. æFc AppleTalk.h
  6378. æT Function
  6379. æD pascal OSErr GetMyZone(XPPParmBlkPtr thePBptr,Boolean async); 
  6380. æDT OSErr myVariable = GetMyZone((XPPParmBlkPtr) thePBptr,(Boolean) async);
  6381. æRI V-542
  6382. æC 
  6383. »AFPCall Function
  6384.  
  6385. The AFPCall function can have one of the following command formats.
  6386.  
  6387.   •  General
  6388.   •  Login
  6389.   •  AFPWrite
  6390.   •  AFPRead
  6391.  
  6392. »General Command Format
  6393.  
  6394. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6395.  
  6396. Parameter block
  6397.   -->    18    cmdResult   long word  AFP command result
  6398.   -->    26    csCode      word       Always AFPCall
  6399.   -->    28    sessRefnum  word       Session reference number
  6400.   -->    30    aspTimeout  byte       Retry interval in seconds
  6401.   -->    32    cbSize      word       Command buffer size
  6402.   -->    34    cbPtr       pointer    Command buffer
  6403.   <->    38    rbSize      word       Reply buffer size and reply size
  6404.   -->    40    rbPtr       pointer    Reply buffer pointer
  6405.   <->    44    wdSize      word       Write data size
  6406.   -->    46    wdPtr       pointer    Write data pointer
  6407.   -->    50    ccbStart    record     Start of memory for CCB
  6408.  
  6409. The general command format for the AFPCall function passes an AFP command to the
  6410. server.  This format is used for all AFP calls except AFPLogin, AFPRead, and AFPWrite.
  6411.   Note that from Pascal this call is referred to as AFPCommand.
  6412.  
  6413. CmdResult is four bytes of data returned from the server containing an indication of
  6414. the result of the AFP command.
  6415.  
  6416. SessRefnum is the session reference number returned in the AFPLogin call.
  6417.  
  6418. ASPTimeOut is the interval in seconds between retries of the call by the driver.
  6419.  
  6420. CBSize is the size in bytes of the block of data that contains the command to be sent
  6421. to the server on the session. The size of the command block must not exceed the value
  6422. of aspMaxCmdSize returned by the ASPGetParms call.
  6423.  
  6424. CBPtr points to start of the block of data (command block) containing the command
  6425. that is to be sent to the server on the session.  The first byte of the command block
  6426. must contain the AFP command byte.  Subsequent bytes in the command buffer contain
  6427. the  parameters associated with the command as defined in the AFP document.
  6428.  
  6429. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6430. command. RBSize is also returned and indicates the size of the reply that was actually
  6431. returned.
  6432.  
  6433. RBPtr points to the reply buffer.
  6434.  
  6435. WDSize is the size of data to be written to the server (only used if the command is
  6436. one that is mapped to an ASPUserWrite).
  6437.  
  6438. WDPtr points to the write data buffer (only used if the command is one that is mapped
  6439. to an ASPUserWrite).
  6440.  
  6441. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6442. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  6443. the exact requirement refer to the CCB Sizes section of this document.
  6444.  
  6445. Result codes    aspParamErr       Invalid session number; session has
  6446.                                   been closed
  6447.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6448.                 aspSessClosed     Session is closing
  6449.                 aspBufTooSmall    Reply is bigger than response buffer or
  6450.                                   buffer will be filled, data will be truncated
  6451.                 afpParmError      AFP command block size is equal to zero.
  6452.                                   This error will also be returned if the
  6453.                                   command byte in the command block is equal
  6454.                                   to 0 or $FF (255) or GetSrvrStatus (15).
  6455.  
  6456. »Login Command Format
  6457.  
  6458. The AFP login command executes a series of AFP operations as defined in the AFP Draft
  6459. Proposal.  For further information, refer to the AFP document.
  6460.  
  6461. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN): OSErr;
  6462.  
  6463. Parameter block
  6464.   -->    18    cmdResult       long word  AFP command result
  6465.   -->    26    csCode          word       Always AFPCall
  6466.   -->    28    sessRefnum      word       Session reference number
  6467.   -->    30    aspTimeout      byte       Retry interval in seconds
  6468.   -->    31    aspRetry        byte       Number of retries
  6469.   -->    32    cbSize          word       Command buffer size
  6470.   -->    34    cbPtr           pointer    Command buffer
  6471.   <->    38    rbSize          word       Reply buffer size and reply size
  6472.   -->    40    rbPtr           pointer    Reply buffer pointer
  6473.   -->    44    afpAddrBlock    long word  Server address block
  6474.   <->    48    afpSCBPtr       pointer    SCB pointer
  6475.   <->    52    afpAttnRoutine  pointer    Attention routine pointer
  6476.   -->    50    ccbStart        record     Start of command control block
  6477.  
  6478. CmdResult is four bytes of data returned from the server containing an indication of
  6479. the result of the AFP command.
  6480.  
  6481. SessRefnum is the session reference number (returned by the AFPLogin call).
  6482.  
  6483. ASPTimeOut is the interval in seconds between retries of the call.
  6484.  
  6485. ASPRetry is the number of retries that will be attempted.
  6486.  
  6487. CBSize is the size in bytes of the block data that contains the command to be sent to
  6488. the server on the session. The size of the command block must not exceed the value of
  6489. aspMaxCmdSize returned by the ASPGetParms call.
  6490.  
  6491. CBPtr points to the block of data (command block) containing the AFP login command
  6492. that is to be sent to the server on the session.  The first byte of the command block
  6493. must be the AFP login command byte.  Subsequent bytes in the command buffer contain
  6494. the parameters associated with the command.
  6495.  
  6496. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6497. command.  RBSize is also returned and indicates the size of the reply that was actually
  6498. returned.
  6499.  
  6500. RBPtr points to the reply buffer.
  6501.  
  6502. AFPServerAddr is the network identifier or address of the socket on which the server
  6503. is listening.
  6504.  
  6505. AFPSCBPointer points to a locked block of data for the session control block
  6506. (SCB). The SCB size is defined by scbMemSize.  The SCB is a locked block, and as long
  6507. as the session is open, the SCB cannot be modified in any way by the application. 
  6508. There is one SCB for each open session.
  6509.  
  6510. AFPAttnRoutine is a pointer to a routine that is invoked if an attention from the
  6511. server is received.  When afpAttnRoutine is equal to zero, no attention routine will
  6512. be invoked.
  6513.  
  6514. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6515. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  6516. the exact requirement refer to the CCB Sizes section later in this chapter.
  6517.  
  6518. Note:  In the parameter block, the afpSCBPointer and the afpAttnRoutine
  6519.        fields overlap with the start of the CCB and are modified by the call.
  6520.  
  6521. Result codes    aspSizeErr        Command block size is bigger than MaxCmdSize
  6522.                 aspBufTooSmall    Reply is bigger than response buffer or
  6523.                                   buffer will be filled, data will be truncated
  6524.                 aspNoServer       Server not responding
  6525.                 aspServerBusy     Server cannot open another session
  6526.                 aspBadVersNum     Server cannot support the offered ASP
  6527.                                   version number
  6528.                 aspNoMoreSess     Driver cannot support another session.
  6529.  
  6530.  
  6531. »AFPWrite Command Format
  6532.  
  6533. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  6534. calls that read or write a data block that is larger than a single ASP-level call is
  6535. capable of reading or writing.  The maximum number of bytes of data that can be read
  6536. or written at the ASP level is equal to quantumSize.
  6537.  
  6538. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6539.  
  6540. Parameter block
  6541.   -->    18    cmdResult   long word  AFP command result
  6542.   -->    26    csCode      word       Always AFPCall
  6543.   -->    28    sessRefnum  word       Session number
  6544.   -->    30    aspTimeout  byte       Retry interval in seconds
  6545.   -->    32    cbSize      word       Command buffer size
  6546.   -->    34    cbPtr       pointer    Command buffer
  6547.   <->    38    rbSize      word       Reply buffer size and reply size
  6548.   -->    40    rbPtr       pointer    Reply buffer pointer
  6549.   -->    44    wdSize      word       (used internally)
  6550.   <->    46    wdPtr       pointer    Write data pointer  (updated)
  6551.   -->    50    ccbStart    record     Start of memory for CCB
  6552.  
  6553. CmdResult is four bytes of data returned from the server containing an indication of
  6554. the result of the AFP command.
  6555.  
  6556. SessRefnum is the session reference number returned in the AFPLogin call.
  6557.  
  6558. ASPTimeOut is the interval in seconds between retries of the call.
  6559.  
  6560. CBSize is the size in bytes of the block data that contains the command to be sent to
  6561. the server on the session.  The size of the command block must not exceed the value
  6562. of aspMaxCmdSize returned by the aspGetParms call.
  6563.  
  6564. CBPtr points to the block of data (see command block structure below) containing the
  6565. AFP write command that is to be sent to the server on the session.  The first byte of
  6566. the Command Block must contain the AFP write command byte.
  6567.  
  6568. RBSize is passed and indicates the size of the reply buffer in bytes expected by the
  6569. command.  RBSize is also returned and indicates the size of the reply that was actually
  6570. returned.
  6571.  
  6572. RBPtr points to the reply buffer.
  6573.  
  6574. WDSize is used internally.
  6575.  
  6576. Note:  This command does not pass the write data size in the queue element
  6577.        but in the command buffer.  XPP will look for the size in that buffer.
  6578.  
  6579. WDPtr is a pointer to the block of data to be written.  Note that this field will be
  6580. updated by XPP as it proceeds and will always point to that section of the data which
  6581. XPP is currently writing.
  6582.  
  6583. CCBStart is the start of the memory to be used by the XPP driver for the command
  6584. control block.  The size of this block is equal to a maximum of 296 bytes.  To determine
  6585. the exact requirement refer to the CCB Sizes section later in this chapter.
  6586.  
  6587. Command Block Structure:  The AFP write command passes several arguments to XPP in
  6588. the command buffer itself. The byte offsets are relative to the location pointed to
  6589. by cbPtr.
  6590.  
  6591.   -->    0    cmdByte       byte       AFP call command byte
  6592.   -->    1    startEndFlag  byte       Start/end Flag
  6593.   <->    4    rwOffset      long word  Offset within fork to write
  6594.   <->    8    reqCount      long word  Requested count
  6595.  
  6596. CmdByte is the AFP call command byte and must contain the AFP write command code.
  6597.  
  6598. StartEndFlag is a one-bit flag (the high bit of the byte) indicating whether the
  6599. rwOffset field is relative to the beginning or the end of the fork (all other bits
  6600. are zero).
  6601.  
  6602.   0 = relative to the beginning of the fork
  6603.   1 = relative to the end of the fork
  6604.  
  6605. RWOffset is the byte offset within the fork at which the write is to begin.
  6606.  
  6607. ReqCount indicates the size of the data to be written and is returned as the actual
  6608. size written.
  6609.  
  6610. The rwOffset and reqCount fields are modified by XPP as the write proceeds and will
  6611. always indicate the current value of these fields.
  6612.  
  6613. The Pascal structure of the AFP command buffer follows:
  6614.  
  6615. AFPCommandBlock = PACKED RECORD
  6616.                     cmdByte:       Byte;
  6617.                     startEndFlag:  Byte;
  6618.                     forkRefNum:    INTEGER;    {used by server}
  6619.                     rwOffset:      LONGINT;
  6620.                     reqCount:      LONGINT;
  6621.                     newLineFlag:   Byte;       {unused by write}
  6622.                     newLineChar:   CHAR;       {unused by write}
  6623.                   END;
  6624.  
  6625. Result codes    aspParamErr       Invalid session number
  6626.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6627.                 aspSessClosed     Session is closing
  6628.                 aspBufTooSmall    Reply is bigger than response buffer
  6629.  
  6630. »AFPRead Command Format
  6631.  
  6632. The AFPWrite and AFPRead command formats allow the calling application to make AFP-level
  6633. calls that read or write a data block that is larger than a single ASP-level call is
  6634. capable of reading or writing.  The maximum number of bytes of data that can be read
  6635. or written at the ASP level is equal to quantumSize.
  6636.  
  6637. FUNCTION AFPCommand (xParamBlock: XPPParmBlkPtr; async: BOOLEAN) : OSErr;
  6638.  
  6639. Parameter block
  6640.   -->    18    cmdResult   long word  ASP command result
  6641.   -->    26    csCode      word       Always AFPCall
  6642.   -->    28    sessRefnum  word       Session number
  6643.   -->    30    aspTimeout  byte       Retry interval in seconds
  6644.   -->    32    cbSize      word       Command buffer size
  6645.   -->    34    cbPtr       pointer    Command buffer
  6646.   -->    38    rbSize      word       Used internally
  6647.   <->    40    rbPtr       pointer    Reply buffer pointer (updated)
  6648.   -->    50    ccbStart    record     Start of memory for CCB
  6649.  
  6650. CmdResult is four bytes of data returned from the server containing an indication of
  6651. the result of the AFP command.
  6652.  
  6653. SessRefnum is the session reference number returned in the AFPLogin  call.
  6654.  
  6655. ASPTimeOut is the interval in seconds between retries of the call.
  6656.  
  6657. CBSize is the size in bytes of the block data that contains the command to be sent to
  6658. the server on the session.  The size of the command block must not exceed the value
  6659. of aspMaxCmdSize returned by the GetParms call.
  6660.  
  6661. CBPtr points to the block of data (command block) containing the AFP read command
  6662. that is to be sent to the server on the session.  The first byte of the command block
  6663. must contain the AFP read command byte.  The command block structure is shown below.
  6664.  
  6665. RBSize  is used internally.
  6666.  
  6667. Note:  This command does not pass the read size in the queue element but
  6668.        in the command buffer.  XPP will look for the size in that buffer.
  6669.  
  6670. RBPtr points to the reply buffer.  Note that this field will be updated by XPP as it
  6671. proceeds and will always point to that section of the buffer that XPP is currently
  6672. reading into.
  6673.  
  6674. CCBStart is the start of the memory to be used by the .XPP driver for the command
  6675. control block.  The size of this block is equal to a maximum of 150 bytes.  To determine
  6676. the exact requirement refer to The CCB Sizes section later in this chapter.
  6677.  
  6678. Command Block Structure:  The AFP read command passes several arguments to XPP in the
  6679. command buffer itself. The byte offsets are relative to the location pointed to by
  6680. cbPointer.
  6681.  
  6682.   -->    0    cmdByte      byte       AFP call command byte
  6683.   <->    4    rwOffset     long word  Offset within fork to read
  6684.   <->    8    reqCount     long word  Requested count
  6685.   -->    12   newLineFlag  byte       Newline Flag
  6686.   -->    13   newLineChar  byte       Newline Character
  6687.  
  6688. CmdByte is the AFP call command byte and must contain the AFP read command code.
  6689.  
  6690. RWOffset is the byte offset within the fork at which the read is to begin.
  6691.  
  6692. ReqCount  indicates the size of the read data buffer and is returned as the actual
  6693. size read.
  6694.  
  6695. The rwOffset and reqCount fields are modified by XPP as the read proceeds and will
  6696. always indicate the current value of these fields.
  6697.  
  6698. NewLineFlag is a one-bit flag (the high bit of the byte) indicating whether or not
  6699. the read is to terminate at a specified character (all other bits are zero).
  6700.  
  6701.   0 = no Newline Character is specified
  6702.   1 = a Newline Character is specified
  6703.  
  6704. NewLineChar is any character from $00 to $FF (inclusive) that, when encountered in
  6705. reading the fork, causes the read operation to terminate.
  6706.  
  6707. The Pascal structure of the AFPCommand follows:
  6708.  
  6709. AFPCommandBlock = PACKED RECORD
  6710.                     cmdByte:       Byte;
  6711.                     startEndFlag:  Byte;     {unused for read}
  6712.                     forkRefNum:    INTEGER;  {used by server}
  6713.                     rwOffset:      LONGINT;
  6714.                     reqCount:      LONGINT;
  6715.                     newLineFlag:   Byte;
  6716.                     newLineChar:   CHAR;
  6717.                   END;
  6718.  
  6719. Result codes    aspParamErr       Invalid session number
  6720.                 aspSizeErr        Command block size is bigger than MaxCmdSize
  6721.                 aspSessClosed     Session is closing
  6722.                 aspBufTooSmall    Reply is bigger than response buffer
  6723.         
  6724.  
  6725. æKY PAttachPH
  6726. æFc AppleTalk.h
  6727. æT Function
  6728. æD pascal OSErr PAttachPH(MPPPBPtr thePBptr,Boolean async); 
  6729. æDT OSErr myVariable = PAttachPH((MPPPBPtr) thePBptr,(Boolean) async);
  6730. æRI II-308, V-513
  6731. æC AttachPH function
  6732.  
  6733. Parameter block
  6734.     ->  26  csCode        word     ;always attachPH
  6735.     ->  28  protType      byte     ;ALAP protocol type
  6736.     ->  30  handler       pointer  ;protocol handler
  6737.  
  6738. AttachPH adds the protocol handler pointed to by handler to the node's protocol 
  6739. table.  ProtType specifies what kind of frame the protocol handler can service.  
  6740.  
  6741. After AttachPH is called, the protocol handler is called for each incoming frame 
  6742. whose ALAP protocol type equals protType.
  6743.  
  6744. Result codes    
  6745.  
  6746.       noErr         No error
  6747.       lapProtErr    Error attaching protocol type
  6748.  
  6749. æKY PDetachPH
  6750. æFc AppleTalk.h
  6751. æT Function
  6752. æD pascal OSErr PDetachPH(MPPPBPtr thePBptr,Boolean async); 
  6753. æDT OSErr myVariable = PDetachPH((MPPPBPtr) thePBptr,(Boolean) async);
  6754. æRI II-308, V-513
  6755. æC DetachPH function
  6756.  
  6757. Parameter block
  6758.     ->  26  csCode        word      ;always detachPH
  6759.     ->  28  protType      byte      ;ALAP protocol type
  6760.  
  6761. DetachPH removes from the node's protocol table the specified ALAP protocol type 
  6762. and corresponding protocol handler.
  6763.  
  6764. Result codes    
  6765.  
  6766.       noErr           No error
  6767.       lapProtErr      Error detaching protocol type
  6768.  
  6769. æKY PWriteLAP
  6770. æFc AppleTalk.h
  6771. æT Function
  6772. æD pascal OSErr PWriteLAP(MPPPBPtr thePBptr,Boolean async); 
  6773. æDT OSErr myVariable = PWriteLAP((MPPPBPtr) thePBptr,(Boolean) async);
  6774. æRI II-307, V-513
  6775. æC WriteLAP function
  6776.  
  6777. Parameter block
  6778.  
  6779.     ->  26  csCode          word       ;always writeLAP
  6780.     ->  30  wdsPointer      pointer    ;write data structure
  6781.  
  6782. WriteLAP sends a frame to another node.  The frame data and destination of the 
  6783. frame are described by the write data structure pointed to by wdsPointer.  The 
  6784. first two data bytes of an ALAP frame sent to another computer using the 
  6785. AppleTalk Manager must indicate the length of the frame in bytes.  The ALAP 
  6786. protocol type byte must be in the range 1 to 127.
  6787.  
  6788. Result codes    
  6789.  
  6790.       noErr          No error
  6791.       excessCollsns  No CTS received after 32 RTS's
  6792.       ddpLengthErr   Packet length exceeds maximum
  6793.       lapProtErr     Invalid ALAP protocol type
  6794.  
  6795. æKY POpenSkt
  6796. æFc AppleTalk.h
  6797. æT Function
  6798. æD pascal OSErr POpenSkt(MPPPBPtr thePBptr,Boolean async); 
  6799. æDT OSErr myVariable = POpenSkt((MPPPBPtr) thePBptr,(Boolean) async);
  6800. æRI II-311, V-513
  6801. æC OpenSkt function
  6802.  
  6803. Parameter block
  6804.  
  6805.     ->  26  csCode        word         ;always openSkt
  6806.     <-> 28  socket        byte         ;socket number
  6807.     ->  30  listener      pointer      ;socket listener
  6808.  
  6809. OpenSkt adds a socket and its socket listener to the socket table.  If the socket 
  6810. parameter is nonzero, it must be in the range 64 to 127, and it specifies the 
  6811. socket's number; if socket is 0, OpenSkt opens a socket with a socket number in the 
  6812. range 128 to 254, and returns it in the socket parameter.  Listener contains a 
  6813. pointer to the socket listener.
  6814.  
  6815. OpenSkt will return ddpSktErr if you pass the number of an already opened socket, 
  6816. if you pass a socket number greater than 127, or if the socket table is full (the 
  6817. socket table can hold a maximum of 12 sockets).
  6818.  
  6819. Result codes    
  6820.  
  6821.       noErr            No error
  6822.       ddpSktErr        Socket error
  6823.  
  6824. æKY PCloseSkt
  6825. æFc AppleTalk.h
  6826. æT Function
  6827. æD pascal OSErr PCloseSkt(MPPPBPtr thePBptr,Boolean async); 
  6828. æDT OSErr myVariable = PCloseSkt((MPPPBPtr) thePBptr,(Boolean) async);
  6829. æRI II-312,V513
  6830. æC CloseSkt function
  6831.  
  6832. Parameter block
  6833.  
  6834.     ->  26  csCode  word    ;always closeSkt
  6835.     ->  28  socket  byte    ;socket number
  6836.  
  6837. CloseSkt removes the entry of the specified socket from the socket table.  If you 
  6838. pass a socket number of 0, or if you attempt to close a socket that isn't open, 
  6839. CloseSkt will return ddpSktErr.
  6840.  
  6841. Result codes    
  6842.  
  6843.       noErr         No error
  6844.       ddpSktErr     Socket error
  6845.  
  6846. æKY PWriteDDP
  6847. æFc AppleTalk.h
  6848. æT Function
  6849. æD pascal OSErr PWriteDDP(MPPPBPtr thePBptr,Boolean async); 
  6850. æDT OSErr myVariable = PWriteDDP((MPPPBPtr) thePBptr,(Boolean) async);
  6851. æRI II-312,V-513
  6852. æC WriteDDP function
  6853.  
  6854. Parameter block
  6855.  
  6856.     ->  26  csCode            word        ;always writeDDP
  6857.     ->  28  socket            byte        ;socket number
  6858.     ->  29  checksumFlag      byte        ;checksum flag
  6859.     ->  30  wdsPointer        pointer     ;write data structure
  6860.  
  6861. WriteDDP sends a datagram to another socket.  WDSPointer points to a write data 
  6862. structure containing the datagram and the address of the destination socket.  If 
  6863. checksumFlag is TRUE, WriteDDP will compute the checksum for all datagrams 
  6864. requiring long headers.
  6865.  
  6866. Result codes    
  6867.  
  6868.       noErr          No error
  6869.       ddpLenErr      Datagram length too big
  6870.       ddpSktErr      Socket error
  6871.       noBridgeErr    No bridge found 
  6872.  
  6873. æKY PRegisterName
  6874. æFc AppleTalk.h
  6875. æT Function
  6876. æD pascal OSErr PRegisterName(MPPPBPtr thePBptr,Boolean async); 
  6877. æDT OSErr myVariable = PRegisterName((MPPPBPtr) thePBptr,(Boolean) async);
  6878. æRI II-322,V-513
  6879. æC RegisterName function
  6880.  
  6881. Parameter block
  6882.  
  6883.     ->  26  csCode           word       ;always registerName
  6884.     ->  28  interval         byte       ;retry interval
  6885.     <-> 29  count            byte       ;retry count
  6886.     ->  30  ntQElPtr         pointer    ;names table element pointer 
  6887.     ->  34  verifyFlag       byte       ;set if verify needed 
  6888.  
  6889. RegisterName adds the name and address of an entity to the node's names table.  
  6890. NTQElPtr points to a names table entry containing the entity's name and internet 
  6891. address (in the form shown in Figure 13 above).  Meta-characters aren't allowed in 
  6892. the object and type fields of the entity name; the zone field, however, must contain 
  6893. the meta-character "*".  If verifyFlag is TRUE, RegisterName checks on the network 
  6894. to see if the name is already in use, and returns a result code of nbpDuplicate if so.  
  6895.  
  6896. Interval and count contain the retry interval in eight-tick units and the retry count.  
  6897. When a retry is made, the count field is modified.
  6898.  
  6899. Warning:  The names table entry passed to RegisterName remains the 
  6900.           property of NBP until removed from the names table.  Don't attempt to remove 
  6901.           or modify it.  If you've allocated memory using a NewHandle call, you must 
  6902.           lock it as long as the name is registered. 
  6903.  
  6904. Warning:  VerifyFlag should normally be set before calling RegisterName.
  6905.  
  6906. Result codes    
  6907.  
  6908.    noErr             No error
  6909.    nbpDuplicate      Duplicate name already exists
  6910.    nbpNISErr         Error opening names information socket 
  6911.  
  6912. æKY PLookupName
  6913. æFc AppleTalk.h
  6914. æT Function
  6915. æD pascal OSErr PLookupName(MPPPBPtr thePBptr,Boolean async); 
  6916. æDT OSErr myVariable = PLookupName((MPPPBPtr) thePBptr,(Boolean) async);
  6917. æRI II-323,V-513
  6918. æC LookupName function
  6919.  
  6920. Parameter block
  6921.  
  6922.     ->   26 csCode             word         ;always lookupName
  6923.     ->      28  interval       byte         ;retry interval
  6924.     <->     29  count          byte         ;retry count
  6925.     ->      30  entityPtr      pointer      ;pointer to entity name
  6926.     ->      34  retBuffPtr     pointer      ;pointer to buffer
  6927.     ->      38  retBuffSize    word         ;buffer size in bytes
  6928.     ->      40  maxToGet       word         ;matches to get
  6929.     <->     42  numGotten      word         ;matches found 
  6930.  
  6931. LookupName returns the addresses of all entities with a specified name.  EntityPtr 
  6932. points to the entity's name (in the form shown in Figure 13 above).  Meta-
  6933. characters are allowed in the entity name.  RetBuffPtr and retBuffSize contain the 
  6934. location and size of an area of memory in which the tuples describing the entity 
  6935. names and their corresponding addresses should be returned.  MaxToGet indicates 
  6936. the maximum number of matching names to find addresses for; the actual number of 
  6937. addresses found is returned in numGotten.  Interval and count contain the retry 
  6938. interval and the retry count.  LookupName completes when either the number of 
  6939. matches is equal to or greater than maxToGet, or the retry count has been exceeded.  
  6940. The count field is decremented for each retransmission.
  6941.  
  6942. Note:  NumGotten is first set to 0 and then incremented with each match 
  6943.        found.  You can test the value in this field, and can start examining the 
  6944.        received addresses in the buffer while the lookup continues.
  6945.  
  6946. Result codes    
  6947.  
  6948.       noErr           No error
  6949.       nbpBuffOvr      Buffer overflow
  6950.  
  6951. æKY PConfirmName
  6952. æFc AppleTalk.h
  6953. æT Function
  6954. æD pascal OSErr PConfirmName(MPPPBPtr thePBptr,Boolean async); 
  6955. æDT OSErr myVariable = PConfirmName((MPPPBPtr) thePBptr,(Boolean) async);
  6956. æRI II-323,V-513
  6957. æC ConfirmName function
  6958.  
  6959. Parameter block
  6960.  
  6961.     ->   26 csCode            word         ;always confirmName
  6962.     ->   28 interval          byte         ;retry interval
  6963.     <->  29  count            byte         ;retry count
  6964.     ->   30 entityPtr         pointer      ;pointer to entity name
  6965.     ->   34 confirmAddr       pointer      ;entity address
  6966.     <-   38 newSocket         byte         ;socket number
  6967.  
  6968. ConfirmName confirms that an entity known by name and address still exists (is 
  6969. still entered in the names directory).  EntityPtr points to the entity's name (in the 
  6970. form shown in Figure 13 above).  ConfirmAddr specifies the address to confirmed.  
  6971.  
  6972. No meta-characters are allowed in the entity name.  Interval and count contain the 
  6973. retry interval and the retry count.  The socket number of the entity is returned in 
  6974. newSocket.  ConfirmName is more efficient than LookupName in terms of network 
  6975. traffic.
  6976.  
  6977. Result codes    
  6978.  
  6979.       noErr             No error
  6980.       nbpConfDiff       Name confirmed for different socket
  6981.       nbpNoConfirm      Name not confirmed
  6982.  
  6983. æKY PRemoveName
  6984. æFc AppleTalk.h
  6985. æT Function
  6986. æD pascal OSErr PRemoveName(MPPPBPtr thePBptr,Boolean async); 
  6987. æDT OSErr myVariable = PRemoveName((MPPPBPtr) thePBptr,(Boolean) async);
  6988. æRI II-324,V-513
  6989. æC RemoveName function
  6990.  
  6991. Parameter block
  6992.  
  6993.     ->  26  csCode        word        ;always removeName 
  6994.     ->  30  entityPtr     pointer     ;pointer to entity name 
  6995.  
  6996. RemoveName removes an entity name from the names table of the given entity's node.
  6997.  
  6998. Result codes    
  6999.  
  7000.    noErr            No error
  7001.    nbpNotFound      Name not found 
  7002.  
  7003. æKY PSetSelfSend
  7004. æFc AppleTalk.h
  7005. æT Function
  7006. æD pascal OSErr PSetSelfSend(MPPPBPtr thePBptr,Boolean async); 
  7007. æDT OSErr myVariable = PSetSelfSend((MPPPBPtr) thePBptr,(Boolean) async);
  7008. æRI V-516
  7009. æC  
  7010. _______________________________________________________________________________
  7011.  
  7012. »SENDING PACKETS TO ONE’S OWN NODE
  7013. _______________________________________________________________________________
  7014.  
  7015. Upon opening, the ability to send a packet to one’s own node (intranode delivery) is
  7016. disabled.  This feature of the AppleTalk Manager can be manipulated through the
  7017. SetSelfSend function.  Once enabled, it is possible, at all levels, to send packets
  7018. to entities within one’s own node.  An example of where this might be desirable is an
  7019. application sending data to a print spooler that is actually running in the background
  7020. on the same node.
  7021.  
  7022. Enabling (or disabling) this feature affects the entire node and should be performed
  7023. with care.  For instance, a desk accessory may not expect to receive names from
  7024. within its own node as a response to an NBP look-up;  enabling this feature from an
  7025. application could break the desk accessory.  All future programs should be written
  7026. with this feature in mind.
  7027.  
  7028. FUNCTION PSetSelfSend (thePBptr: MPPPBPtr; async: BOOLEAN) : OSErr;
  7029.  
  7030. Parameter Block
  7031.   -->    26    csCode         word    Always PSetSelfSend
  7032.   -->    28    newSelfFlag    byte    New SelfSend flag
  7033.   <--    29    oldSelfFlag    byte    Old SelfSend flag
  7034.  
  7035. PSetSelfSend enables or disables the intranode delivery feature of the AppleTalk
  7036. Manager.  If newSelfFlag is nonzero, the feature will be enabled; otherwise it will
  7037. be disabled.  The previous value of the flag will be returned in oldSelfFlag.
  7038.  
  7039. Result Codes    noErr        No error
  7040.  
  7041. æKY PKillNBP
  7042. æFc AppleTalk.h
  7043. æT Function
  7044. æD pascal OSErr PKillNBP(MPPPBPtr thePBptr,Boolean async); 
  7045. æDT OSErr myVariable = PKillNBP((MPPPBPtr) thePBptr,(Boolean) async);
  7046. æRI V-518
  7047. æC  
  7048. _______________________________________________________________________________
  7049.  
  7050. »NAME BINDING PROTOCOL CHANGES
  7051. _______________________________________________________________________________
  7052.  
  7053. Changes to the Name Binding Protocol include supporting multiple concurrent requests
  7054. and a means for aborting an active request.
  7055.  
  7056. »Multiple Concurrent NBP Requests
  7057.  
  7058. NBP now supports multiple concurrent active requests.  Specifically, a number of
  7059. LookupNames, RegisterNames and ConfirmNames can all be active concurrently.  The
  7060. maximum number of  concurrent requests is machine dependent; if it is exceeded the
  7061. error tooManyReqs will be returned.  Active requests can be aborted by the PKillNBP
  7062. call.
  7063.  
  7064. »KillNBP function
  7065.  
  7066. FUNCTION PKillNBP (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7067.  
  7068. •••Refer to Technical Note #199:•••
  7069.  
  7070. Parameter block
  7071.   -->    26    csCode    word     Always PKillNBP
  7072.   -->    28    aKillQEl  pointer  Pointer to queue element
  7073.  
  7074. PKillNBP is used to abort an outstanding LookupName, RegisterName or ConfirmName
  7075. request.  To abort one of these calls, place a pointer to the queue element of the
  7076. call to abort in a KillQEl and issue the PKillNBP call.  The call will be completed
  7077. with a ReqAborted error.
  7078.  
  7079. Result Codes    noErr          No error
  7080.                 cbNotFound     aKillQEl does not point to a valid
  7081.                                NBP queue element
  7082.  
  7083. æKY PGetAppleTalkInfo
  7084. æFc AppleTalk.h
  7085. æT Function
  7086. æD pascal OSErr PGetAppleTalkInfo(MPPPBPtr thePBptr,Boolean async); 
  7087. æDT OSErr myVariable = PGetAppleTalkInfo((MPPPBPtr) thePBptr,(Boolean) async);
  7088. æRI V-518
  7089. æC  
  7090. _______________________________________________________________________________
  7091.  
  7092. »NAME BINDING PROTOCOL CHANGES
  7093. _______________________________________________________________________________
  7094.  
  7095. Changes to the Name Binding Protocol include supporting multiple concurrent requests
  7096. and a means for aborting an active request.
  7097.  
  7098. »Multiple Concurrent NBP Requests
  7099.  
  7100. NBP now supports multiple concurrent active requests.  Specifically, a number of
  7101. LookupNames, RegisterNames and ConfirmNames can all be active concurrently.  The
  7102. maximum number of  concurrent requests is machine dependent; if it is exceeded the
  7103. error tooManyReqs will be returned.  Active requests can be aborted by the PKillNBP
  7104. call.
  7105.  
  7106. »KillNBP function
  7107.  
  7108. FUNCTION PKillNBP (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7109.  
  7110. •••Refer to Technical Note #199:•••
  7111.  
  7112. Parameter block
  7113.   -->    26    csCode    word     Always PKillNBP
  7114.   -->    28    aKillQEl  pointer  Pointer to queue element
  7115.  
  7116. PKillNBP is used to abort an outstanding LookupName, RegisterName or ConfirmName
  7117. request.  To abort one of these calls, place a pointer to the queue element of the
  7118. call to abort in a KillQEl and issue the PKillNBP call.  The call will be completed
  7119. with a ReqAborted error.
  7120.  
  7121. Result Codes    noErr          No error
  7122.                 cbNotFound     aKillQEl does not point to a valid
  7123.                                NBP queue element
  7124.  
  7125. æKY PATalkClosePrep
  7126. æFc AppleTalk.h
  7127. æT Function
  7128. æD pascal OSErr PATalkClosePrep(MPPPBPtr thePBptr,Boolean async); 
  7129. æDT OSErr myVariable = PATalkClosePrep((MPPPBPtr) thePBptr,(Boolean) async);
  7130. æRI V-518
  7131. æC  
  7132. _______________________________________________________________________________
  7133.  
  7134. »NAME BINDING PROTOCOL CHANGES
  7135. _______________________________________________________________________________
  7136.  
  7137. Changes to the Name Binding Protocol include supporting multiple concurrent requests
  7138. and a means for aborting an active request.
  7139.  
  7140. »Multiple Concurrent NBP Requests
  7141.  
  7142. NBP now supports multiple concurrent active requests.  Specifically, a number of
  7143. LookupNames, RegisterNames and ConfirmNames can all be active concurrently.  The
  7144. maximum number of  concurrent requests is machine dependent; if it is exceeded the
  7145. error tooManyReqs will be returned.  Active requests can be aborted by the PKillNBP
  7146. call.
  7147.  
  7148. »KillNBP function
  7149.  
  7150. FUNCTION PKillNBP (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7151.  
  7152. •••Refer to Technical Note #199:•••
  7153.  
  7154. Parameter block
  7155.   -->    26    csCode    word     Always PKillNBP
  7156.   -->    28    aKillQEl  pointer  Pointer to queue element
  7157.  
  7158. PKillNBP is used to abort an outstanding LookupName, RegisterName or ConfirmName
  7159. request.  To abort one of these calls, place a pointer to the queue element of the
  7160. call to abort in a KillQEl and issue the PKillNBP call.  The call will be completed
  7161. with a ReqAborted error.
  7162.  
  7163. Result Codes    noErr          No error
  7164.                 cbNotFound     aKillQEl does not point to a valid
  7165.                                NBP queue element
  7166.  
  7167. æKY POpenATPSkt
  7168. æFc AppleTalk.h
  7169. æT Function
  7170. æD pascal OSErr POpenATPSkt(ATPPBPtr thePBptr,Boolean async); 
  7171. æDT OSErr myVariable = POpenATPSkt((ATPPBPtr) thePBptr,(Boolean) async);
  7172. æRI II-315,V-513
  7173. æC OpenATPSkt function
  7174.  
  7175. Parameter block
  7176.  
  7177.     ->  26 csCode         word          ;always openATPSkt
  7178.     <-> 28  atpSocket     byte          ;socket number
  7179.     ->  30  addrBlock     long word     ;socket request specification
  7180.  
  7181. OpenATPSkt opens a socket for the purpose of receiving requests.  ATPSocket 
  7182. contains the socket number of the socket to open.  If it's 0, a number is dynamically 
  7183. assigned and returned in atpSocket.  AddrBlock contains a specification of the 
  7184. socket addresses from which requests will be accepted.  A 0 in the network number, 
  7185. node ID, or socket number field of addrBlock means that requests will be accepted 
  7186. from every network, node, or socket, respectively.
  7187.  
  7188. Result codes    
  7189.  
  7190.       noErr             No error
  7191.       tooManySkts       Too many responding sockets
  7192.       noDataArea        Too many outstanding ATP calls
  7193.  
  7194. æKY PCloseATPSkt
  7195. æFc AppleTalk.h
  7196. æT Function
  7197. æD pascal OSErr PCloseATPSkt(ATPPBPtr thePBPtr,Boolean async); 
  7198. æDT OSErr myVariable = PCloseATPSkt((ATPPBPtr) thePBPtr,(Boolean) async);
  7199. æRI II-316,V-513
  7200. æC CloseATPSkt function
  7201.  
  7202. Parameter block
  7203.     ->  26  csCode      word    ;always closeATPSkt
  7204.     ->  28  atpSocket   byte    ;socket number
  7205.  
  7206. CloseATPSkt closes the socket whose number is specified by atpSocket, for the 
  7207. purpose of receiving requests.
  7208.  
  7209. Result codes    
  7210.    noErr      No error
  7211.  
  7212. æKY PSendRequest
  7213. æFc AppleTalk.h
  7214. æT Function
  7215. æD pascal OSErr PSendRequest(ATPPBPtr thePBPtr,Boolean async); 
  7216. æDT OSErr myVariable = PSendRequest((ATPPBPtr) thePBPtr,(Boolean) async);
  7217. æRI II-316,V-513
  7218. æC SendRequest function
  7219.  
  7220. Parameter block
  7221.  
  7222.     ->  18  userData           long word      ;user bytes
  7223.     <-  22  reqTID             word           ;transaction ID used in request
  7224.     ->  26  csCode             word           ;always sendRequest
  7225.     <-  28  currBitMap         byte           ;bit map
  7226.     <-> 29  atpFlags           byte           ;control information
  7227.     ->  30  addrBlock          long word      ;destination socket address
  7228.     ->  34 reqLength           word           ;request size in bytes
  7229.     ->  36 reqPointer          pointer        ;pointer to request data
  7230.     ->  40 bdsPointer          pointer        ;pointer to response BDS
  7231.     ->  44 numOfBuffs          byte           ;number of responses expected
  7232.     ->  45 timeOutVal          byte           ;timeout interval
  7233.     <-  46 numOfResps          byte           ;number of responses received
  7234.     <-> 47  retryCount         byte           ;number of retries
  7235.  
  7236. SendRequest sends a request to another socket and waits for a response.  UserData 
  7237. contains the four user bytes.  AddrBlock indicates the socket to which the request 
  7238. should be sent.  ReqLength and reqPointer contain the size and location of the 
  7239. request to send.  BDSPointer points to a response BDS where the responses are to be 
  7240. returned; numOfBuffs indicates the number of responses requested.  The number of 
  7241. responses received is returned in numOfResps.  If a nonzero value is returned in 
  7242. numOfResps, you can examine currBitMap to determine which packets of the 
  7243. transaction were actually received and to detect pieces for higher-level recovery, 
  7244. if desired.
  7245.  
  7246. TimeOutVal indicates the number of seconds that SendRequest should wait for a 
  7247. response before resending the request.  RetryCount indicates the maximum number 
  7248. of retries SendRequest should attempt.  The end-of-message flag of atpFlags will 
  7249. be set if the EOM bit is set in the last packet received in a valid response sequence.  
  7250. The exactly-once flag should be set if you want the request to be part of an 
  7251. exactly-once transaction.
  7252.  
  7253. To cancel a SendRequest call, you need the transaction ID; it's returned in reqTID.  
  7254. You can examine reqTID before the completion of the call, but its contents are valid 
  7255. only after the tidValid bit of atpFlags has been set.
  7256. SendRequest completes when either an entire response is received or the retry 
  7257. count is exceeded.
  7258.  
  7259. Note:  The value provided in retryCount will be modified during SendRequest 
  7260.        if any retries are made.  This field is used to monitor the number of retries; 
  7261.        for each retry, it's decremented by 1.
  7262.  
  7263. Result codes    
  7264.  
  7265.    noErr             No error
  7266.       reqFailed      Retry count exceeded
  7267.       tooManyReqs      Too many concurrent requests
  7268.       noDataArea        Too many outstanding ATP calls
  7269.       reqAborted        Request canceled by user
  7270.  
  7271. æKY PGetRequest
  7272. æFc AppleTalk.h
  7273. æT Function
  7274. æD pascal OSErr PGetRequest(ATPPBPtr thePBPtr,Boolean async); 
  7275. æDT OSErr myVariable = PGetRequest((ATPPBPtr) thePBPtr,(Boolean) async);
  7276. æRI II-317,V-513
  7277. æC GetRequest function
  7278.  
  7279. Parameter block
  7280.  
  7281.     <-   18 userData         long word     ;user bytes
  7282.     ->   26 csCode           word          ;always getRequest
  7283.     ->   28 atpSocket        byte          ;socket number
  7284.     <-   29 atpFlags         byte          ;control information
  7285.     <-   30 addrBlock        long word     ;source of request
  7286.     <->  34  reqLength       word          ;request buffer size
  7287.     ->   36 reqPointer       pointer       ;pointer to request buffer
  7288.     <-   44 bitMap           byte          ;bit map
  7289.     <-   46  transID         word          ;transaction ID
  7290.  
  7291. GetRequest sets up the mechanism to receive a request sent by a SendRequest call.  
  7292. UserData returns the four user bytes from the request.  ATPSocket contains the 
  7293. socket number of the socket that should listen for a request.  The internet address 
  7294. of the socket from which the request was sent is returned in addrBlock.  ReqLength 
  7295. and reqPointer indicate the size (in bytes) and location of a buffer to store the 
  7296. incoming request.  The actual size of the request is returned in reqLength.  The 
  7297. transaction bit map and transaction ID will be returned in bitMap and transID.  The 
  7298. exactly-once flag in atpFlags will be set if the request is part of an exactly-once 
  7299. transaction.
  7300.  
  7301. GetRequest completes when a request is received.
  7302.  
  7303. Result codes    
  7304.  
  7305.    noErr         No error
  7306.    badATPSkt     Bad responding socket
  7307.  
  7308. æKY PSendResponse
  7309. æFc AppleTalk.h
  7310. æT Function
  7311. æD pascal OSErr PSendResponse(ATPPBPtr thePBPtr,Boolean async); 
  7312. æDT OSErr myVariable = PSendResponse((ATPPBPtr) thePBPtr,(Boolean) async);
  7313. æRI II-317,V-513
  7314. æC SendResponse function
  7315.  
  7316. Parameter block
  7317.  
  7318.     <-  18  userData      long word     ;user bytes from TRel
  7319.     <-  22  reqTID        word          ;transaction ID used in request
  7320.     ->  26  csCode        word          ;always sendResponse
  7321.     ->  28  atpSocket     byte          ;socket number
  7322.     ->  29  atpFlags      byte          ;control information
  7323.     ->  30  addrBlock    long word      ;response destination
  7324.     ->  40  bdsPointer    pointer       ;pointer to response BDS 
  7325.     ->  44  numOfBuffs    byte          ;number of response packets being sent
  7326.     ->  45  bdsSize       byte          ;BDS size in elements
  7327.     ->  46  transID       word          ;transaction ID 
  7328.  
  7329. SendResponse sends a response to a socket.  If the response was part of an exactly-
  7330. once transaction, userData will contain the user bytes from the TRel packet.  
  7331. ATPSocket contains the socket number from which the response should be sent.  The 
  7332. end-of-message flag in atpFlags should be set if the response contains the final 
  7333. packet in a transaction composed of a group of packets and the number of responses 
  7334. is less than requested.  AddrBlock indicates the address of the socket to which the 
  7335. response should be sent.  BDSPointer points to a response BDS containing room for 
  7336. the maximum number of responses to be sent; bdsSize contains this maximum 
  7337. number.  NumOfBuffs contains the number of response packets to be sent in this 
  7338. call; you may wish to make AddResponse calls to complete the response.  TransID 
  7339. indicates the transaction ID of the associated request.
  7340.  
  7341. During exactly-once transactions, SendResponse doesn't complete until either a 
  7342. TRel packet is received from the socket that made the request, or the retry count is 
  7343. exceeded.
  7344.  
  7345. Result codes    
  7346.  
  7347.       noErr              No error
  7348.       badATPSkt          Bad responding socket
  7349.       noRelErr           No release received
  7350.       noDataArea         Too many outstanding ATP calls
  7351.       badBuffNum         Sequence number out of range
  7352.  
  7353. æKY PAddResponse
  7354. æFc AppleTalk.h
  7355. æT Function
  7356. æD pascal OSErr PAddResponse(ATPPBPtr thePBPtr,Boolean async); 
  7357. æDT OSErr myVariable = PAddResponse((ATPPBPtr) thePBPtr,(Boolean) async);
  7358. æRI II-318,V-513
  7359. æC AddResponse function
  7360.  
  7361. Parameter block
  7362.  
  7363.     ->  18  userData        long word   ;user bytes
  7364.     ->  26  csCode          word        ;always addResponse
  7365.     ->  28  atpSocket       byte        ;socket number
  7366.     ->  29  atpFlags        byte        ;control information
  7367.     ->  30  addrBlock       long word   ;response destination
  7368.     ->  34  reqLength       word        ;response size
  7369.     ->  36  reqPointer      pointer     ;pointer to response
  7370.     ->  44  rspNum          byte        ;sequence number
  7371.     ->  46  transID         word        ;transaction ID
  7372.  
  7373. AddResponse sends an additional response packet to a socket that has already been 
  7374. sent the initial part of a response via SendResponse.  UserData contains the four 
  7375. user bytes.  ATPSocket contains the socket number from which the response should 
  7376. be sent.  The end-of-message flag in atpFlags should be set if this response packet 
  7377. is the final packet in a transaction composed of a group of packets and the number 
  7378. of responses is less than requested.  AddrBlock indicates the socket to which the 
  7379. response should be sent.  ReqLength and reqPointer contain the size (in bytes) and 
  7380. location of the response to send; rspNum indicates the sequence number of the 
  7381. response (in the range 0 to 7).  TransID must contain the transaction ID.
  7382.  
  7383. Warning:  If the transaction is part of an exactly-once transaction, the buffer 
  7384.           used in the AddResponse call must not be altered or released until the 
  7385.           corresponding SendResponse call has completed. 
  7386.  
  7387. Result codes    
  7388.  
  7389.       noErr           No error
  7390.       badATPSkt       Bad responding socket
  7391.       noSendResp      AddResponse issued before SendResponse
  7392.       badBuffNum      Sequence number out of range
  7393.       noDataArea      Too many outstanding ATP calls
  7394.  
  7395. æKY PRelTCB
  7396. æFc AppleTalk.h
  7397. æT Function
  7398. æD pascal OSErr PRelTCB(ATPPBPtr thePBPtr,Boolean async); 
  7399. æDT OSErr myVariable = PRelTCB((ATPPBPtr) thePBPtr,(Boolean) async);
  7400. æRI II-319,V-513
  7401. æC RelTCB function
  7402.  
  7403. Parameter block
  7404.  
  7405.     ->  26  csCode        word           ;always relTCB
  7406.     ->  30  addrBlock     long word      ;destination of request
  7407.     ->  46  transID       word           ;transaction ID of request
  7408.  
  7409. RelTCB dequeues the specified SendRequest call and returns the result code 
  7410. reqAborted for the aborted call.  The transaction ID can be obtained from the reqTID 
  7411. field of the SendRequest queue entry; see the description of SendRequest for details.
  7412.  
  7413. Result codes    
  7414.  
  7415.    noErr            No error
  7416.    cbNotFound       ATP control block not found
  7417.    noDataArea       Too many outstanding ATP calls
  7418.  
  7419. æKY PRelRspCB
  7420. æFc AppleTalk.h
  7421. æT Function
  7422. æD pascal OSErr PRelRspCB(ATPPBPtr thePBPtr,Boolean async); 
  7423. æDT OSErr myVariable = PRelRspCB((ATPPBPtr) thePBPtr,(Boolean) async);
  7424. æRI II-319,V-514
  7425. æC RelRspCB function
  7426.  
  7427. Parameter block
  7428.  
  7429.     ->  26  csCode        word          ;always relRspCB
  7430.     ->  28  atpSocket     byte          ;socket number that request was received on
  7431.     ->  30  addrBlock     long word     ;source of request
  7432.     ->  46  transID       word          ;transaction ID of request
  7433.  
  7434. In an exactly-once transaction, RelRspCB cancels the specified SendResponse, 
  7435. without waiting for the release timer to expire or a TRel packet to be received.  No 
  7436. error is returned for the SendResponse call.  Whan called to cancel a transaction 
  7437. that isn't using exactly-once service, RelRspCB returns cbNotFound.  The 
  7438. transaction ID can be obtained from the reqTID field of the SendResponse queue 
  7439. entry; see the description of SendResponse for details.
  7440.  
  7441. Result codes    
  7442.  
  7443.    noErr            No error
  7444.    cbNotFound       ATP control block not found
  7445.  
  7446. æKY PNSendRequest
  7447. æFc AppleTalk.h
  7448. æT Function
  7449. æD pascal OSErr PNSendRequest(ATPPBPtr thePBPtr,Boolean async); 
  7450. æDT OSErr myVariable = PNSendRequest((ATPPBPtr) thePBPtr,(Boolean) async);
  7451. æRI V-516
  7452. æC  
  7453. »Sending an ATP Request Through a Specified Socket
  7454.  
  7455. ATP requests can now be sent through client-specified sockets.  ATP previously would
  7456. open a dynamic socket, send the request through it, and close the socket when the
  7457. request was completed.  The client can now choose to send a request through an already-opened
  7458. socket; this also allows more than one request to be sent per socket.   A new call,
  7459. PNSendRequest, has been added for this purpose.  The function of the old SendRequest
  7460. call itself remains unchanged.
  7461.  
  7462. FUNCTION PNSendRequest (thePBptr: ATPBPtr; async: BOOLEAN) : OSErr;
  7463.  
  7464. Parameter block
  7465.   -->    18    userData     longword  User bytes
  7466.   <--    22    reqTID       word      Transaction ID used in request
  7467.   -->    26    csCode       word      Always sendRequest
  7468.   <->    28    atpSocket    byte      Socket to send request on
  7469.                                        or current bitmap
  7470.   <->    29    atpFlags     byte      Control information
  7471.   -->    30    addrBlock    longword  Destination socket address
  7472.   -->    34    reqLength    word      Request size in bytes
  7473.   -->    36    reqPointer   pointer   Pointer to request data
  7474.   -->    40    bdsPointer   pointer   Pointer to response BDS
  7475.   -->    44    numOfBuffs   byte      Number of responses expected
  7476.   -->    45    timeOutVal   byte      Timeout interval
  7477.   <--    46    numOf Resps  byte      Number of responses received
  7478.   <->    47    retryCount   byte      Number of retries
  7479.   <--    48    intBuff      word      Used internally
  7480.  
  7481. The PNSendRequest call is functionally equivalent to the SendRequest call, however
  7482. PNSendRequest allows you to specify, in the atpSocket field, the socket through which
  7483. the request is to be sent.  This socket must have been previously opened through an
  7484. OpenATPSkt request (otherwise a badATPSkt error will be returned).  Note that PNSendRequest
  7485. requires two additional bytes of memory at the end of the parameter block, immediately
  7486. following the retryCount.  These bytes are for the internal use of the AppleTalk
  7487. Manager and should not be modified while the PNSendRequest call is active.
  7488.  
  7489. There is a machine-dependent limit as to the number of concurrent PNSendRequests that
  7490. can be active on a given socket.  If this limit is exceeded, the error tooManyReqs is
  7491. returned.
  7492.  
  7493. One additional difference between SendRequest and PNSendRequest is that a PNSendRequest
  7494. can only be aborted by a PKillSendReq call (see below), whereas a SendRequest can be
  7495. aborted by either a RelTCB or KillSendReq call.
  7496.  
  7497. Result Codes    noErr          No error
  7498.                 reqFailed      Retry count exceeded
  7499.                 tooManyReqs    Too many concurrent requests
  7500.                 noDataArea     Too many outstanding ATP calls
  7501.                 reqAborted     Request cancelled by user
  7502.  
  7503. æKY PKillSendReq
  7504. æFc AppleTalk.h
  7505. æT Function
  7506. æD pascal OSErr PKillSendReq(ATPPBPtr thePBPtr,Boolean async); 
  7507. æDT OSErr myVariable = PKillSendReq((ATPPBPtr) thePBPtr,(Boolean) async);
  7508. æRI V-517
  7509. æC  
  7510. »Aborting ATP SendRequests
  7511.  
  7512. The  RelTCB call is still supported, but only for aborting SendRequests.  To abort
  7513. PNSendRequests, a new call, PKillSendReq, has been added.  This call will abort both
  7514. SendRequests and PNSendRequests.  PKillSendReq’s only argument is the queue element
  7515. pointer of the request to be aborted.  The queue element pointer is passed at the
  7516. offset of the PKillSendReq queue element specified by aKillQE1.
  7517.  
  7518. FUNCTION PKillSendReq (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7519.  
  7520. Parameter block
  7521.   -->    26    csCode    word     Always PKillSendReq
  7522.   -->    44    aKillQEl  pointer  Pointer to queue element
  7523.  
  7524. PKillSendReq is functionally equivalent to RelTCB, except that it takes different
  7525. arguments and will abort both SendRequests and PNSendRequests.  To abort one of these
  7526. calls, place a pointer to the queue element of the call to abort in aKillQEl and
  7527. issue the PKillSendReq call.
  7528.  
  7529. Result Codes    noErr          No error
  7530.                 cbNotFound     aKillQEl does not point to a SendReq
  7531.                                or NSendReq queue element
  7532.  
  7533. æKY PKillGetReq
  7534. æFc AppleTalk.h
  7535. æT Function
  7536. æD pascal OSErr PKillGetReq(ATPPBPtr thePBPtr,Boolean async); 
  7537. æDT OSErr myVariable = PKillGetReq((ATPPBPtr) thePBPtr,(Boolean) async);
  7538. æRI V-518
  7539. æC  
  7540. »Aborting ATP GetRequests
  7541.  
  7542. ATP GetRequests can now be aborted through the PKillGetReq call.  This call looks and
  7543. works just like the PKillSendReq call, and is used to abort a specific GetRequest
  7544. call.  Previously it was necessary to close the socket  to abort all GetRequest calls
  7545. on the socket.
  7546.  
  7547. FUNCTION PKillGetReq (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7548.  
  7549. Parameter block
  7550.   -->    26    csCode    word     Always PKillGetReq
  7551.   -->    44    aKillQEl  pointer  Pointer to queue element
  7552.  
  7553. PKillGetReq will abort a specific outstanding GetRequest call (as opposed to closing
  7554. the socket, which aborts all outstanding GetRequests on that socket).  The call will
  7555. be completed with a reqAborted error.  To abort a GetRequest, place a pointer to the
  7556. queue element of the call to abort in aKillQEl and issue the PKillGetReq call.
  7557.  
  7558. Result Codes    noErr         No error
  7559.                 cbNotFound    aKillQEl does not point to a GetReq
  7560.                               queue element
  7561.  
  7562. æKY ATPKillAllGetReq
  7563. æFc AppleTalk.h
  7564. æT Function
  7565. æD pascal OSErr ATPKillAllGetReq(ATPPBPtr thePBPtr,Boolean async); 
  7566. æDT OSErr myVariable = ATPKillAllGetReq((ATPPBPtr) thePBPtr,(Boolean) async);
  7567. æRI V-518
  7568. æC  
  7569. »Aborting ATP GetRequests
  7570.  
  7571. ATP GetRequests can now be aborted through the PKillGetReq call.  This call looks and
  7572. works just like the PKillSendReq call, and is used to abort a specific GetRequest
  7573. call.  Previously it was necessary to close the socket  to abort all GetRequest calls
  7574. on the socket.
  7575.  
  7576. FUNCTION PKillGetReq (thePBptr: ATPPBPtr; async: BOOLEAN) : OSErr;
  7577.  
  7578. Parameter block
  7579.   -->    26    csCode    word     Always PKillGetReq
  7580.   -->    44    aKillQEl  pointer  Pointer to queue element
  7581.  
  7582. PKillGetReq will abort a specific outstanding GetRequest call (as opposed to closing
  7583. the socket, which aborts all outstanding GetRequests on that socket).  The call will
  7584. be completed with a reqAborted error.  To abort a GetRequest, place a pointer to the
  7585. queue element of the call to abort in aKillQEl and issue the PKillGetReq call.
  7586.  
  7587. Result Codes    noErr         No error
  7588.                 cbNotFound    aKillQEl does not point to a GetReq
  7589.                               queue element
  7590.  
  7591. æKY BuildLAPwds
  7592. æFc AppleTalk.h
  7593. æT Function
  7594. æD pascal void BuildLAPwds(Ptr wdsPtr,Ptr dataPtr,short destHost,short prototype,
  7595.     short frameLen); 
  7596. æDT BuildLAPwds((Ptr) wdsPtr,(Ptr) dataPtr,(short) destHost,(short) prototype,()
  7597.     short frameLen);
  7598. æRI V-514
  7599. æC 
  7600. This routine builds a single-frame write data structure LAP WDS for use with the
  7601. PWriteLAP call.  Given a buffer of length frameLen pointed to by dataPtr, it fills in
  7602. the WDS pointed to by wdsPtr and sets the destination node and protocol type as
  7603. indicated by destHost and protoType, respectively.  The WDS indicated must contain at
  7604. least two elements.
  7605.  
  7606. æKY BuildDDPwds
  7607. æFc AppleTalk.h
  7608. æT Function
  7609. æD pascal void BuildDDPwds(Ptr wdsPtr,Ptr headerPtr,Ptr dataPtr,const AddrBlock netAddr,
  7610.     short ddpType,short dataLen); 
  7611. æDT BuildDDPwds((Ptr) wdsPtr,(Ptr) headerPtr,(Ptr) dataPtr,(const AddrBlock) netAddr,()
  7612.     short ddpType,(short) dataLen);
  7613. æRI V-514
  7614. æC 
  7615. This routine builds a single-frame write data structure  DDP WDS, for use with the
  7616. PWriteDDP call.  Given a header buffer of at least 17 bytes pointed to by headerPtr
  7617. and a data buffer of length dataLen pointed to by dataPtr, it fills in the WDS pointed
  7618. to by wdsPtr, and sets the destination address and protocol type as indicated by
  7619. destaddress and DDPtype, respectively.  The WDS indicated must contain at least 3
  7620. elements.
  7621.  
  7622. æKY NBPSetEntity
  7623. æFc AppleTalk.h
  7624. æT Function
  7625. æD pascal void NBPSetEntity(Ptr buffer,Ptr nbpObject,Ptr nbpType,Ptr nbpZone); 
  7626. æDT NBPSetEntity((Ptr) buffer,(Ptr) nbpObject,(Ptr) nbpType,(Ptr) nbpZone);
  7627. æRI V-514
  7628. æC 
  7629. This routine builds an NBP entity structure, for use with the PLookupNBP and PConfirmName
  7630. calls.  Given a buffer of at least the size of the EntityName data structure (99
  7631. bytes) pointed to by buffer, this routine sets the indicated object, type, and zone
  7632. in that buffer.
  7633.  
  7634. æKY NBPSetNTE
  7635. æFc AppleTalk.h
  7636. æT Function
  7637. æD pascal void NBPSetNTE(Ptr ntePtr,Ptr nbpObject,Ptr nbpType,Ptr nbpZone,
  7638.     short socket); 
  7639. æDT NBPSetNTE((Ptr) ntePtr,(Ptr) nbpObject,(Ptr) nbpType,(Ptr) nbpZone,()
  7640.     short socket);
  7641. æRI V-515
  7642. æC 
  7643. This routine builds an NBP names table entry, for use with the PRegisterName call. 
  7644. Given a names table entry of at least the size of the EntityName data structure plus
  7645. nine bytes (108 bytes) pointed to by ntePtr, this routine sets the indicated object,
  7646. type, zone, and socket in that names table entry.
  7647.  
  7648. æKY GetBridgeAddress
  7649. æFc AppleTalk.h
  7650. æT Function
  7651. æD pascal short GetBridgeAddress(void); 
  7652. æDT short myVariable = GetBridgeAddress()(void);
  7653. æRT 132
  7654. æRI V-515, N132-2
  7655. æC 
  7656. This routine returns the current address of a bridge in the low byte, or zero if
  7657. there is none.
  7658.  
  7659. æKY BuildBDS
  7660. æFc AppleTalk.h
  7661. æT Function
  7662. æD pascal short BuildBDS(Ptr buffPtr,Ptr bdsPtr,short buffSize); 
  7663. æDT short myVariable = BuildBDS((Ptr) buffPtr,(Ptr) bdsPtr,(short) buffSize);
  7664. æRI V-515
  7665. æC 
  7666. This routine builds a BDS, for use with the ATP calls.  Given a data buffer of length
  7667. buffSize pointed to by buffPtr, it fills in the BDS pointed to by bdsPtr.  The buffer
  7668. will be broken up into pieces of maximum size (578 bytes).  The user bytes in the BDS
  7669. are not modified by this routine.  This routine is provided only as a convenience;
  7670. generally the caller will be able to build the BDS completely from Pascal without
  7671. it.
  7672.  
  7673. æKY MPPOpen
  7674. æFc AppleTalk.h
  7675. æT Function
  7676. æD pascal OSErr MPPOpen(void); 
  7677. æDT OSErr myVariable = MPPOpen()(void);
  7678. æMM
  7679. æRT 224
  7680. æRI II-275
  7681. æC 
  7682. MPPOpen first checks whether the .MPP driver has already been loaded; if it has,
  7683. MPPOpen does nothing and returns noErr. If MPP hasn’t been loaded, MPPOpen attempts
  7684. to load it into the system heap. If it succeeds, it then initializes the driver’s
  7685. variables and goes through the process of dynamically assigning a node ID to that
  7686. Macintosh. On a Macintosh 512K or XL, it also loads the .ATP driver and NBP code into
  7687. the system heap.
  7688.  
  7689. If serial port B isn’t configured for AppleTalk, or is already in use, the .MPP
  7690. driver isn’t loaded and an appropriate result code is returned.
  7691.  
  7692. Result codes    noErr        No error
  7693.                 portInUse    Port B is already in use
  7694.                 portNotCf    Port B not configured for AppleTalk
  7695.  
  7696. æKY MPPClose
  7697. æFc AppleTalk.h
  7698. æT Function
  7699. æD pascal OSErr MPPClose(void); 
  7700. æDT OSErr myVariable = MPPClose()(void);
  7701. æMM
  7702. æRI II-275
  7703. æC 
  7704. MPPClose removes the .MPP driver, and any data structures associated with it, from
  7705. memory. If the .ATP driver or NBP code were also installed, they’re removed as well.
  7706. MPPClose also returns the use of port B to the Serial Driver.
  7707.  
  7708. Warning:  Since other co-resident programs may be using AppleTalk, it’s
  7709.           strongly recommended that you never use this call. MPPClose will
  7710.           completely disable AppleTalk; the only way to restore AppleTalk
  7711.           is to call MPPOpen again.
  7712.  
  7713. æKY LAPOpenProtocol
  7714. æFc AppleTalk.h
  7715. æT Function
  7716. æD pascal OSErr LAPOpenProtocol(ABByte theLAPType,Ptr protoPtr); 
  7717. æDT OSErr myVariable = LAPOpenProtocol((ABByte) theLAPType,(Ptr) protoPtr);
  7718. æMM
  7719. æRI II-277
  7720. æC 
  7721. LAPOpenProtocol adds the ALAP protocol type specified by theLAPType to the
  7722. node’s protocol table. If you provide a pointer to a protocol handler in protoPtr,
  7723. ALAP will send each frame with an ALAP protocol type of theLAPType to that protocol
  7724. handler.
  7725.  
  7726. If protoPtr is NIL, the default protocol handler will be used for receiving frames
  7727. with an ALAP protocol type of theLAPType. In this case, to receive a frame you must
  7728. call LAPRead to provide the default protocol handler with a buffer for placing the
  7729. data. If, however, you’ve written your own protocol handler and protoPtr points to
  7730. it, your protocol handler will have the responsibility for receiving the frame and
  7731. it’s not necessary to call LAPRead.
  7732.  
  7733. Result codes    noErr         No error
  7734.                 lapProtErr    Error attaching protocol type
  7735.  
  7736. æKY LAPCloseProtocol
  7737. æFc AppleTalk.h
  7738. æT Function
  7739. æD pascal OSErr LAPCloseProtocol(ABByte theLAPType); 
  7740. æDT OSErr myVariable = LAPCloseProtocol((ABByte) theLAPType);
  7741. æMM
  7742. æRI II-277
  7743. æC 
  7744. LAPCloseProtocol removes from the node’s protocol table the specified ALAP protocol
  7745. type, as well as its protocol handler.
  7746.  
  7747. Warning:  Don’t close ALAP protocol type values 1 or 2. If you close these
  7748.           protocol types, DDP will be disabled; once disabled, the only way
  7749.           to restore DDP is to restart the system, or to close and then
  7750.           reopen AppleTalk.
  7751.  
  7752. Result codes    noErr         No error
  7753.                 lapProtErr    Error detaching protocol type
  7754.  
  7755. æKY LAPWrite
  7756. æFc AppleTalk.h
  7757. æT Function
  7758. æD pascal OSErr LAPWrite(ATLAPRecHandle abRecord,Boolean async); 
  7759. æDT OSErr myVariable = LAPWrite((ATLAPRecHandle) abRecord,(Boolean) async);
  7760. æMM
  7761. æRI II-277
  7762. æC 
  7763. ABusRecord
  7764.   <--    abOpcode                {always tLAPWrite}
  7765.   <--    abResult                {result code}
  7766.   -->    abUserReference         {for your use}
  7767.   -->    lapAddress.dstNodeID    {destination node ID}
  7768.   -->    lapAddress.lapProtType  {ALAP protocol type}
  7769.   -->    lapReqCount             {length of frame data}
  7770.   -->    lapDataPtr              {pointer to frame data}
  7771.  
  7772. LAPWrite sends a frame to another node. LAPReqCount and lapDataPtr specify the length
  7773. and location of the data to send. The lapAddress.lapProtType field indicates the ALAP
  7774. protocol type of the frame and the lapAddress.dstNodeID indicates the node ID of the
  7775. node to which the frame should be sent.
  7776.  
  7777. Note:  The first two bytes of an ALAP frame’s data must contain the length
  7778.        in bytes of that data, including the length bytes themselves.
  7779.  
  7780. Result codes    noErr            No error
  7781.                 excessCollsns    Unable to contact destination node;
  7782.                                  packet not sent
  7783.                 ddpLenErr        ALAP data length too big
  7784.                 lapProtErr       Invalid ALAP protocol type
  7785.  
  7786. æKY LAPRead
  7787. æFc AppleTalk.h
  7788. æT Function
  7789. æD pascal OSErr LAPRead(ATLAPRecHandle abRecord,Boolean async); 
  7790. æDT OSErr myVariable = LAPRead((ATLAPRecHandle) abRecord,(Boolean) async);
  7791. æMM
  7792. æRI II-278
  7793. æC  
  7794. ABusRecord
  7795.   <--    abOpcode                {always tLAPRead}
  7796.   <--    abResult                {result code}
  7797.   -->    abUserReference         {for your use}
  7798.   <--    lapAddress.dstNodeID    {destination node ID}
  7799.   <--    lapAddress.srcNodeID    {source node ID}
  7800.   -->    lapAddress.lapProtType  {ALAP protocol type}
  7801.   -->    lapReqCount             {buffer size in bytes}
  7802.   <--    lapActCount             {number of frame data bytes actually received}
  7803.   -->    lapDataPtr              {pointer to buffer}
  7804.  
  7805. LAPRead receives a frame from another node. LAPReqCount and lapDataPtr specify the
  7806. size and location of the buffer that will receive the frame data. If the buffer isn’t
  7807. large enough to hold all of the incoming frame data, the extra bytes will be discarded
  7808. and buf2SmallErr will be returned. The number of bytes actually received is returned
  7809. in lapActCount. Only frames with ALAP protocol type equal to lapAddress.lapProtType
  7810. will be received. The node IDs of the frame’s source and destination nodes are returned
  7811. in lapAddress.srcNodeID and lapAddress.dstNodeID. You can determine whether the
  7812. packet was broadcast to you by examining the value of lapAddress.dstNodeID—if the
  7813. packet was broadcast it’s equal to 255, otherwise it’s equal to your node ID.
  7814.  
  7815. Note:  You should issue LAPRead calls only for ALAP protocol types that were
  7816.        opened (via LAPOpenProtocol) to use the default protocol handler.
  7817.  
  7818. Warning:  If you close a protocol type for which there are still LAPRead
  7819.           calls pending, the calls will be canceled but the memory occupied
  7820.           by their ABusRecords will not be released. For this reason, before
  7821.           closing a protocol type, call LAPRdCancel to cancel any pending
  7822.           LAPRead calls associated with that protocol type.
  7823.  
  7824. Result codes    noErr           No error
  7825.                 buf2SmallErr    Frame too large for buffer
  7826.                 readQErr        Invalid protocol type or protocol type not
  7827.                                 found in table
  7828.  
  7829. æKY LAPRdCancel
  7830. æFc AppleTalk.h
  7831. æT Function
  7832. æD pascal OSErr LAPRdCancel(ATLAPRecHandle abRecord); 
  7833. æDT OSErr myVariable = LAPRdCancel((ATLAPRecHandle) abRecord);
  7834. æMM
  7835. æRI II-279
  7836. æC 
  7837. Given the handle to the ABusRecord of a previously made LAPRead call, LAPRdCancel
  7838. dequeues the LAPRead call, provided that a packet satisfying the LAPRead has not
  7839. already arrived. LAPRdCancel returns noErr if the LAPRead call is successfully removed
  7840. from the queue. If LAPRdCancel returns recNotFnd, check the abResult field to verify
  7841. that the LAPRead has been completed and determine its outcome.
  7842.  
  7843. Result codes    noErr        No error
  7844.                 readQErr     Invalid protocol type or protocol type not
  7845.                              found in table
  7846.                 recNotFnd    ABRecord not found in queue
  7847.  
  7848. »Example
  7849.  
  7850. This example sends an ALAP packet synchronously and waits asynchronously for a response.
  7851. Assume that both nodes are using a known protocol type (in this case, 73) to receive
  7852. packets, and that the destination node has a node ID of 4.
  7853.  
  7854. VAR
  7855.   myABRecord: ABRecHandle;
  7856.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  7857.   myLAPType: Byte;
  7858.   errCode, index, dataLen: INTEGER;
  7859.   someText: Str255;
  7860.   async: BOOLEAN;
  7861.  
  7862. BEGIN
  7863.   errCode := MPPOpen;
  7864.   IF errCode <> noErr THEN
  7865.     WRITELN('Error in opening AppleTalk')
  7866.     {Maybe serial port B isn't available for use by AppleTalk}
  7867.   ELSE
  7868.     BEGIN
  7869.     {Call Memory Manager to allocate ABusRecord}
  7870.     myABRecord := ABRecHandle(NewHandle(lapSize));
  7871.     myLAPType := 73;
  7872.    {Enter myLAPType into protocol handler table and install default handler to }
  7873.     { service frames of that ALAP type. No packets of that ALAP type will be }
  7874.     { received until we call LAPRead.}
  7875.     errCode := LAPOpenProtocol(myLAPType, NIL);
  7876.     IF errCode <> noErr THEN
  7877.       WRITELN('Error while opening the protocol type')
  7878.       {Have we opened too many protocol types? Remember that DDP uses two of }
  7879.       { them.}
  7880.     ELSE
  7881.       BEGIN
  7882.       {Prepare data to be sent}
  7883.       someText := 'This data will be in the ALAP data area';
  7884.       {The .MPP implementation requires that the first two bytes of the ALAP }
  7885.       { data field contain the length of the data, including the length bytes }
  7886.       { themselves.}
  7887.       dataLen := LENGTH(someText) + 2;
  7888.       buffer[0] := CHR(dataLen DIV 256); {high byte of data length}
  7889.       buffer[1] := CHR(dataLen MOD 256); {low byte of data length}
  7890.       FOR index := 1 TO dataLen - 2 DO {stuff buffer with packet data}
  7891.         buffer[index + 1] := someText[index];
  7892.       async := FALSE;
  7893.       WITH myABRecord^^ DO {fill parameters in the ABusRecord}
  7894.         BEGIN
  7895.         lapAddress.lapProtType := myLAPType;
  7896.         lapAddress.dstNodeID := 4;
  7897.         lapReqCount := dataLen;
  7898.         lapDataPtr := @buffer;
  7899.         END;
  7900.       {Send the frame}
  7901.       errCode := LAPWrite(myABRecord, async);
  7902.       {In the case of a sync call, errCode and the abResult field of }
  7903.       { the myABRecord will contain the same result code. We can also }
  7904.       { reuse myABRecord, since we know whether the call has completed.}
  7905.       IF errCode <> noErr THEN
  7906.         WRITELN('Error while writing out the packet')
  7907.         {Maybe the receiving node wasn't on-line}
  7908.       ELSE
  7909.         BEGIN
  7910.         {We have sent out the packet and are now waiting for a response. We }
  7911.         { issue an async LAPRead call so that we don't “hang” waiting for a }
  7912.         { response that may not come.}
  7913.         async := TRUE;
  7914.         WITH myABRecord^^ DO
  7915.           BEGIN
  7916.           lapAddress.lapProtType := myLAPType;
  7917.           {ALAP type we want to receive }
  7918.           lapReqCount := 600; {our buffer is maximum size}
  7919.           lapDataPtr := @buffer;
  7920.           END;
  7921.         errCode := LAPRead(myABRecord, async); {wait for a packet}
  7922.         IF errCode <> noErr THEN
  7923.           WRITELN('Error while trying to queue up a LAPRead')
  7924.           {Was the protocol handler installed correctly?}
  7925.         ELSE
  7926.           BEGIN
  7927.           {We can either sit here in a loop and poll the abResult }
  7928.           { field or just exit our code and use the event }
  7929.           { mechanism to flag us when the packet arrives.}
  7930.           CheckForMyEvent; {your procedure for checking for a network event}
  7931.           errCode := LAPCloseProtocol(myLAPType);
  7932.           IF errCode <> noErr THEN
  7933.             WRITELN('Error while closing the protocol type');
  7934.           END;
  7935.         END;
  7936.       END;
  7937.     END;
  7938. END.
  7939.  
  7940. æKY LAPAddATQ
  7941. æFc AppleTalk.h
  7942. æT Function
  7943. æD pascal OSErr LAPAddATQ(ATQEntryPtr theATQEntry); 
  7944. æDT OSErr myVariable = LAPAddATQ((ATQEntryPtr) theATQEntry);
  7945. æMM
  7946. æRI II-279
  7947. æC 
  7948. Given the handle to the ABusRecord of a previously made LAPRead call, LAPRdCancel
  7949. dequeues the LAPRead call, provided that a packet satisfying the LAPRead has not
  7950. already arrived. LAPRdCancel returns noErr if the LAPRead call is successfully removed
  7951. from the queue. If LAPRdCancel returns recNotFnd, check the abResult field to verify
  7952. that the LAPRead has been completed and determine its outcome.
  7953.  
  7954. Result codes    noErr        No error
  7955.                 readQErr     Invalid protocol type or protocol type not
  7956.                              found in table
  7957.                 recNotFnd    ABRecord not found in queue
  7958.  
  7959. »Example
  7960.  
  7961. This example sends an ALAP packet synchronously and waits asynchronously for a response.
  7962. Assume that both nodes are using a known protocol type (in this case, 73) to receive
  7963. packets, and that the destination node has a node ID of 4.
  7964.  
  7965. VAR
  7966.   myABRecord: ABRecHandle;
  7967.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  7968.   myLAPType: Byte;
  7969.   errCode, index, dataLen: INTEGER;
  7970.   someText: Str255;
  7971.   async: BOOLEAN;
  7972.  
  7973. BEGIN
  7974.   errCode := MPPOpen;
  7975.   IF errCode <> noErr THEN
  7976.     WRITELN('Error in opening AppleTalk')
  7977.     {Maybe serial port B isn't available for use by AppleTalk}
  7978.   ELSE
  7979.     BEGIN
  7980.     {Call Memory Manager to allocate ABusRecord}
  7981.     myABRecord := ABRecHandle(NewHandle(lapSize));
  7982.     myLAPType := 73;
  7983.    {Enter myLAPType into protocol handler table and install default handler to }
  7984.     { service frames of that ALAP type. No packets of that ALAP type will be }
  7985.     { received until we call LAPRead.}
  7986.     errCode := LAPOpenProtocol(myLAPType, NIL);
  7987.     IF errCode <> noErr THEN
  7988.       WRITELN('Error while opening the protocol type')
  7989.       {Have we opened too many protocol types? Remember that DDP uses two of }
  7990.       { them.}
  7991.     ELSE
  7992.       BEGIN
  7993.       {Prepare data to be sent}
  7994.       someText := 'This data will be in the ALAP data area';
  7995.       {The .MPP implementation requires that the first two bytes of the ALAP }
  7996.       { data field contain the length of the data, including the length bytes }
  7997.       { themselves.}
  7998.       dataLen := LENGTH(someText) + 2;
  7999.       buffer[0] := CHR(dataLen DIV 256); {high byte of data length}
  8000.       buffer[1] := CHR(dataLen MOD 256); {low byte of data length}
  8001.       FOR index := 1 TO dataLen - 2 DO {stuff buffer with packet data}
  8002.         buffer[index + 1] := someText[index];
  8003.       async := FALSE;
  8004.       WITH myABRecord^^ DO {fill parameters in the ABusRecord}
  8005.         BEGIN
  8006.         lapAddress.lapProtType := myLAPType;
  8007.         lapAddress.dstNodeID := 4;
  8008.         lapReqCount := dataLen;
  8009.         lapDataPtr := @buffer;
  8010.         END;
  8011.       {Send the frame}
  8012.       errCode := LAPWrite(myABRecord, async);
  8013.       {In the case of a sync call, errCode and the abResult field of }
  8014.       { the myABRecord will contain the same result code. We can also }
  8015.       { reuse myABRecord, since we know whether the call has completed.}
  8016.       IF errCode <> noErr THEN
  8017.         WRITELN('Error while writing out the packet')
  8018.         {Maybe the receiving node wasn't on-line}
  8019.       ELSE
  8020.         BEGIN
  8021.         {We have sent out the packet and are now waiting for a response. We }
  8022.         { issue an async LAPRead call so that we don't “hang” waiting for a }
  8023.         { response that may not come.}
  8024.         async := TRUE;
  8025.         WITH myABRecord^^ DO
  8026.           BEGIN
  8027.           lapAddress.lapProtType := myLAPType;
  8028.           {ALAP type we want to receive }
  8029.           lapReqCount := 600; {our buffer is maximum size}
  8030.           lapDataPtr := @buffer;
  8031.           END;
  8032.         errCode := LAPRead(myABRecord, async); {wait for a packet}
  8033.         IF errCode <> noErr THEN
  8034.           WRITELN('Error while trying to queue up a LAPRead')
  8035.           {Was the protocol handler installed correctly?}
  8036.         ELSE
  8037.           BEGIN
  8038.           {We can either sit here in a loop and poll the abResult }
  8039.           { field or just exit our code and use the event }
  8040.           { mechanism to flag us when the packet arrives.}
  8041.           CheckForMyEvent; {your procedure for checking for a network event}
  8042.           errCode := LAPCloseProtocol(myLAPType);
  8043.           IF errCode <> noErr THEN
  8044.             WRITELN('Error while closing the protocol type');
  8045.           END;
  8046.         END;
  8047.       END;
  8048.     END;
  8049. END.
  8050.  
  8051. æKY LAPRmvATQ
  8052. æFc AppleTalk.h
  8053. æT Function
  8054. æD pascal OSErr LAPRmvATQ(ATQEntryPtr theATQEntry); 
  8055. æDT OSErr myVariable = LAPRmvATQ((ATQEntryPtr) theATQEntry);
  8056. æMM
  8057. æRI II-279
  8058. æC 
  8059. Given the handle to the ABusRecord of a previously made LAPRead call, LAPRdCancel
  8060. dequeues the LAPRead call, provided that a packet satisfying the LAPRead has not
  8061. already arrived. LAPRdCancel returns noErr if the LAPRead call is successfully removed
  8062. from the queue. If LAPRdCancel returns recNotFnd, check the abResult field to verify
  8063. that the LAPRead has been completed and determine its outcome.
  8064.  
  8065. Result codes    noErr        No error
  8066.                 readQErr     Invalid protocol type or protocol type not
  8067.                              found in table
  8068.                 recNotFnd    ABRecord not found in queue
  8069.  
  8070. »Example
  8071.  
  8072. This example sends an ALAP packet synchronously and waits asynchronously for a response.
  8073. Assume that both nodes are using a known protocol type (in this case, 73) to receive
  8074. packets, and that the destination node has a node ID of 4.
  8075.  
  8076. VAR
  8077.   myABRecord: ABRecHandle;
  8078.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  8079.   myLAPType: Byte;
  8080.   errCode, index, dataLen: INTEGER;
  8081.   someText: Str255;
  8082.   async: BOOLEAN;
  8083.  
  8084. BEGIN
  8085.   errCode := MPPOpen;
  8086.   IF errCode <> noErr THEN
  8087.     WRITELN('Error in opening AppleTalk')
  8088.     {Maybe serial port B isn't available for use by AppleTalk}
  8089.   ELSE
  8090.     BEGIN
  8091.     {Call Memory Manager to allocate ABusRecord}
  8092.     myABRecord := ABRecHandle(NewHandle(lapSize));
  8093.     myLAPType := 73;
  8094.    {Enter myLAPType into protocol handler table and install default handler to }
  8095.     { service frames of that ALAP type. No packets of that ALAP type will be }
  8096.     { received until we call LAPRead.}
  8097.     errCode := LAPOpenProtocol(myLAPType, NIL);
  8098.     IF errCode <> noErr THEN
  8099.       WRITELN('Error while opening the protocol type')
  8100.       {Have we opened too many protocol types? Remember that DDP uses two of }
  8101.       { them.}
  8102.     ELSE
  8103.       BEGIN
  8104.       {Prepare data to be sent}
  8105.       someText := 'This data will be in the ALAP data area';
  8106.       {The .MPP implementation requires that the first two bytes of the ALAP }
  8107.       { data field contain the length of the data, including the length bytes }
  8108.       { themselves.}
  8109.       dataLen := LENGTH(someText) + 2;
  8110.       buffer[0] := CHR(dataLen DIV 256); {high byte of data length}
  8111.       buffer[1] := CHR(dataLen MOD 256); {low byte of data length}
  8112.       FOR index := 1 TO dataLen - 2 DO {stuff buffer with packet data}
  8113.         buffer[index + 1] := someText[index];
  8114.       async := FALSE;
  8115.       WITH myABRecord^^ DO {fill parameters in the ABusRecord}
  8116.         BEGIN
  8117.         lapAddress.lapProtType := myLAPType;
  8118.         lapAddress.dstNodeID := 4;
  8119.         lapReqCount := dataLen;
  8120.         lapDataPtr := @buffer;
  8121.         END;
  8122.       {Send the frame}
  8123.       errCode := LAPWrite(myABRecord, async);
  8124.       {In the case of a sync call, errCode and the abResult field of }
  8125.       { the myABRecord will contain the same result code. We can also }
  8126.       { reuse myABRecord, since we know whether the call has completed.}
  8127.       IF errCode <> noErr THEN
  8128.         WRITELN('Error while writing out the packet')
  8129.         {Maybe the receiving node wasn't on-line}
  8130.       ELSE
  8131.         BEGIN
  8132.         {We have sent out the packet and are now waiting for a response. We }
  8133.         { issue an async LAPRead call so that we don't “hang” waiting for a }
  8134.         { response that may not come.}
  8135.         async := TRUE;
  8136.         WITH myABRecord^^ DO
  8137.           BEGIN
  8138.           lapAddress.lapProtType := myLAPType;
  8139.           {ALAP type we want to receive }
  8140.           lapReqCount := 600; {our buffer is maximum size}
  8141.           lapDataPtr := @buffer;
  8142.           END;
  8143.         errCode := LAPRead(myABRecord, async); {wait for a packet}
  8144.         IF errCode <> noErr THEN
  8145.           WRITELN('Error while trying to queue up a LAPRead')
  8146.           {Was the protocol handler installed correctly?}
  8147.         ELSE
  8148.           BEGIN
  8149.           {We can either sit here in a loop and poll the abResult }
  8150.           { field or just exit our code and use the event }
  8151.           { mechanism to flag us when the packet arrives.}
  8152.           CheckForMyEvent; {your procedure for checking for a network event}
  8153.           errCode := LAPCloseProtocol(myLAPType);
  8154.           IF errCode <> noErr THEN
  8155.             WRITELN('Error while closing the protocol type');
  8156.           END;
  8157.         END;
  8158.       END;
  8159.     END;
  8160. END.
  8161.  
  8162. æKY DDPOpenSocket
  8163. æFc AppleTalk.h
  8164. æT Function
  8165. æD pascal OSErr DDPOpenSocket(short *theSocket,Ptr sktListener); 
  8166. æDT OSErr myVariable = DDPOpenSocket((short *) theSocket,(Ptr) sktListener);
  8167. æMM
  8168. æRI II-282
  8169. æC 
  8170. DDPOpenSocket adds a socket and its socket listener to the socket table. If theSocket
  8171. is nonzero, it must be in the range 64 to 127, and it specifies the socket’s number;
  8172. if theSocket is 0, DDPOpenSocket dynamically assigns a socket number in the range 128
  8173. to 254, and returns it in theSocket. SktListener contains a pointer to the socket
  8174. listener; if it’s NIL, the default listener will be used.
  8175.  
  8176. If you’re using the default socket listener, you must then call DDPRead to receive a
  8177. datagram (in order to specify buffer space for the default socket listener). If,
  8178. however, you’ve written your own socket listener and sktListener points to it, your
  8179. listener will provide buffers for receiving datagrams and you shouldn’t use DDPRead
  8180. calls.
  8181.  
  8182. DDPOpenSocket will return ddpSktErr if you pass the number of an already opened
  8183. socket, if you pass a socket number greater than 127, or if the socket table is
  8184. full.
  8185.  
  8186. Note:  The range of static socket numbers 1 through 63 is reserved by Apple
  8187.        for internal use. Socket numbers 64 through 127 are available for
  8188.        unrestricted experimental use.
  8189.  
  8190. Result codes    noErr        No error
  8191.                 ddpSktErr    Socket error
  8192.  
  8193. æKY DDPCloseSocket
  8194. æFc AppleTalk.h
  8195. æT Function
  8196. æD pascal OSErr DDPCloseSocket(char theSocket); 
  8197. æDT OSErr myVariable = DDPCloseSocket((char) theSocket);
  8198. æMM
  8199. æRI II-282
  8200. æC 
  8201. DDPCloseSocket removes the entry of the specified socket from the socket table and
  8202. cancels all pending DDPRead calls that have been made for that socket. If you pass a
  8203. socket number of 0, or if you attempt to close a socket that isn’t open, DDPCloseSocket
  8204. will return ddpSktErr.
  8205.  
  8206. Result codes    noErr        No error
  8207.                 ddpSktErr    Socket error
  8208.  
  8209. æKY DDPRead
  8210. æFc AppleTalk.h
  8211. æT Function
  8212. æD pascal OSErr DDPRead(ATDDPRecHandle abRecord,Boolean retCksumErrs,Boolean async); 
  8213. æDT OSErr myVariable = DDPRead((ATDDPRecHandle) abRecord,(Boolean) retCksumErrs,(Boolean) async);
  8214. æMM
  8215. æRI II-283
  8216. æC 
  8217. ABusRecord
  8218.   <--    abOpcode         {always tDDPRead}
  8219.   <--    abResult         {result code}
  8220.   -->    abUserReference  {for your use}
  8221.   <--    ddpType          {DDP protocol type}
  8222.   -->    ddpSocket        {listening socket number}
  8223.   <--    ddpAddress       {source socket address}
  8224.   -->    ddpReqCount      {buffer size in bytes}
  8225.   <--    ddpActCount      {number of bytes actually received}
  8226.   -->    ddpDataPtr       {pointer to buffer}
  8227.   <--    ddpNodeID        {original destination node ID}
  8228.  
  8229. DDPRead receives a datagram from another socket. The size and location of the buffer
  8230. that will receive the data are specified by ddpReqCount and ddpDataPtr. If the buffer
  8231. isn’t large enough to hold all of the incoming frame data, the extra bytes will be
  8232. discarded and buf2SmallErr will be returned. The number of bytes actually received is
  8233. returned in ddpActCount. DDPSocket specifies the socket to receive the datagram (the
  8234. “listening” socket). The node to which the packet was sent is returned in ddpNodeID;
  8235. if the packet was broadcast ddpNodeID will contain 255. The address of the socket
  8236. that sent the packet is returned in ddpAddress. If retCksumErrs is FALSE, DDPRead
  8237. will discard any packets received with an invalid checksum and inform the caller of
  8238. the error. If retCksumErrs is TRUE, DDPRead will deliver all packets, whether or not
  8239. the checksum is valid; it will also notify the caller when there’s a checksum error.
  8240.  
  8241. Note:  The sender of the datagram must be in a different node from the
  8242.        receiver. You should issue DDPRead calls only for receiving datagrams
  8243.        for sockets opened with the default socket listener; see the
  8244.        description of DDPOpenSocket.
  8245.  
  8246. Note:  If the buffer provided isn’t large enough to hold all of the incoming
  8247.        frame data (buf2SmallErr), the checksum can’t be calculated; in this
  8248.        case, DDPRead will deliver packets even if retCksumErrs is FALSE.
  8249.  
  8250. Result codes    noErr           No error
  8251.                 buf2SmallErr    Datagram too large for buffer
  8252.                 cksumErr        Checksum error
  8253.                 ddpLenErr       Datagram length too big
  8254.                 ddpSktErr       Socket error
  8255.                 readQErr        Invalid socket or socket not found in table
  8256.  
  8257. æKY DDPWrite
  8258. æFc AppleTalk.h
  8259. æT Function
  8260. æD pascal OSErr DDPWrite(ATDDPRecHandle abRecord,Boolean doChecksum,Boolean async); 
  8261. æDT OSErr myVariable = DDPWrite((ATDDPRecHandle) abRecord,(Boolean) doChecksum,(Boolean) async);
  8262. æMM
  8263. æRI II-283
  8264. æC  
  8265. ABusRecord
  8266.   <--    abOpcode         {always tDDPWrite}
  8267.   <--    abResult         {result code}
  8268.   -->    abUserReference  {for your use}
  8269.   -->    ddpType          {DDP protocol type}
  8270.   -->    ddpSocket        {source socket number}
  8271.   -->    ddpAddress       {destination socket address}
  8272.   -->    ddpReqCount      {length of datagram data}
  8273.   -->    ddpDataPtr       {pointer to buffer}
  8274.  
  8275. DDPWrite sends a datagram to another socket. DDPReqCount and ddpDataPtr specify the
  8276. length and location of the data to send. The ddpType field indicates the DDP protocol
  8277. type of the frame, and ddpAddress is the complete internet address of the socket to
  8278. which the datagram should be sent. DDPSocket specifies the socket from which the
  8279. datagram should be sent. Datagrams sent over the internet to a node on an AppleTalk
  8280. network different from the sending node’s network have an optional software checksum
  8281. to detect errors that might occur inside the intermediate bridges. If doChecksum is
  8282. TRUE, DDPWrite will compute this checksum; if it’s FALSE, this software checksum
  8283. feature is ignored.
  8284.  
  8285. Note:  The destination socket can’t be in the same node as the program
  8286.        making the DDPWrite call.
  8287.  
  8288. Result codes    noErr          No error
  8289.                 ddpLenErr      Datagram length too big
  8290.                 ddpSktErr      Source socket not open
  8291.                 noBridgeErr    No bridge found
  8292.  
  8293. æKY DDPRdCancel
  8294. æFc AppleTalk.h
  8295. æT Function
  8296. æD pascal OSErr DDPRdCancel(ATDDPRecHandle abRecord); 
  8297. æDT OSErr myVariable = DDPRdCancel((ATDDPRecHandle) abRecord);
  8298. æMM
  8299. æRI II-284
  8300. æC 
  8301. Given the handle to the ABusRecord of a previously made DDPRead call, DDPRdCancel
  8302. dequeues the DDPRead call, provided that a packet satisfying the DDPRead hasn’t
  8303. already arrived. DDPRdCancel returns noErr if the DDPRead call is successfully removed
  8304. from the queue. If DDPRdCancel returns recNotFnd, check the abResult field of abRecord
  8305. to verify that the DDPRead has been completed and determine its outcome.
  8306.  
  8307. Result codes    noErr        No error
  8308.                 readQErr     Invalid socket or socket not found in table
  8309.                 recNotFnd    ABRecord not found in queue
  8310.  
  8311. »Example
  8312.  
  8313. This example sends a DDP packet synchronously and waits asynchronously for a response.
  8314. Assume that both nodes are using a known socket number (in this case, 30) to receive
  8315. packets. Normally, you would want to use NBP to look up your destination’s socket
  8316. address.
  8317.  
  8318. VAR
  8319.   myABRecord: ABRecHandle;
  8320.   myBuffer: PACKED ARRAY [0..599] OF CHAR; {buffer for both send and receive}
  8321.   mySocket: Byte;
  8322.   errCode, index, dataLen: INTEGER;
  8323.   someText: Str255;
  8324.   async, retCksumErrs, doChecksum: BOOLEAN;
  8325.  
  8326. BEGIN
  8327.   errCode := MPPOpen;
  8328.   IF errCode <> noErr THEN
  8329.     WRITELN('Error in opening AppleTalk')
  8330.     {Maybe serial port B isn't available for use by AppleTalk}
  8331.   ELSE
  8332.     BEGIN
  8333.       {Call Memory Manager to allocate ABusRecord}
  8334.       myABRecord := ABRecHandle(NewHandle(ddpSize));
  8335.       mySocket := 30;
  8336.   {Add mySocket to socket table and install default socket listener to service }
  8337. { datagrams addressed to that socket. No packets addressed to mySocket will be }
  8338.       { received until we call DDPRead. }
  8339.       errCode := DDPOpenSocket(mySocket, NIL);
  8340.       IF errCode <> noErr THEN
  8341.         WRITELN('Error while opening the socket')
  8342.       {Have we opened too many socket listeners? Remember that DDP uses two of }
  8343.         { them.}
  8344.       ELSE
  8345.         BEGIN
  8346.           {Prepare data to be sent}
  8347.           someText := 'This is a sample datagram';
  8348.           dataLen := LENGTH(someText);
  8349.           FOR index := 0 TO dataLen - 1 DO {stuff buffer with packet data}
  8350.             myBuffer[index] := someText[index + 1];
  8351.           async := FALSE;
  8352.           WITH myABRecord^^ DO {fill the parameters in the ABusRecord}
  8353.             BEGIN
  8354.               ddpType := 5;
  8355.               ddpAddress.aNet := 0; {send on “our” network}
  8356.               ddpAddress.aNode := 34;
  8357.               ddpAddress.aSocket := mySocket;
  8358.               ddpReqCount := dataLen;
  8359.               ddpDataPtr := @myBuffer;
  8360.             END;
  8361.           doChecksum := FALSE;
  8362.     {If packet contains a DDP long header, compute checksum and insert it into }
  8363.           { the header.}
  8364.           errCode := DDPWrite(myABRecord, doChecksum, async); {send packet}
  8365.      {In the case of a sync call, errCode and the abResult field of myABRecord }
  8366.    { will contain the same result code. We can also reuse myABRecord, since we }
  8367.           { know whether the call has completed.}
  8368.           IF errCode <> noErr THEN
  8369.             WRITELN('Error while writing out the packet')
  8370.             {Maybe the receiving node wasn't on-line}
  8371.           ELSE
  8372.             BEGIN
  8373.            {We have sent out the packet and are now waiting for a response. We }
  8374.            { issue an async DDPRead call so that we don't “hang” waiting for a }
  8375.           { response that may not come. To cancel the async read call, we must }
  8376.               { close the socket associated with the call or call DDPRdCancel.}
  8377.               async := TRUE;
  8378.               retCksumErrs := TRUE; {return packets even if }
  8379.                                     { they have a checksum error}
  8380.               WITH myABRecord^^ DO
  8381.                 BEGIN
  8382.                   ddpSocket := mySocket;
  8383.                   ddpReqCount := 600; {our reception buffer is max size}
  8384.                   ddpDataPtr := @myBuffer;
  8385.                 END;
  8386.               {Wait for a packet asynchronously}
  8387.               errCode := DDPRead(myABRecord, retCksumErrs, async);
  8388.               IF errCode <> noErr THEN
  8389.                 WRITELN('Error while trying to queue up a DDPRead')
  8390.                 {Was the socket listener installed correctly?}
  8391.               ELSE
  8392.                 BEGIN
  8393.                   {We can either sit here in a loop and poll the }
  8394.                   { abResult field or just exit our code and use the }
  8395.                   { event mechanism to flag us when the packet arrives.}
  8396.                   CheckForMyEvent; {your procedure for checking for a }
  8397.                                    { network event}
  8398.                   {If there were no errors, a packet is inside the array }
  8399.                   { mybuffer, the length is in ddpActCount, and the }
  8400.                   { address of the sending socket is in ddpAddress. }
  8401.                   { Process the packet received here and report any errors.}
  8402.                   errCode := DDPCloseSocket(mySocket); {we're done with it}
  8403.                   IF errCode <> noErr THEN
  8404.                     WRITELN('Error while closing the socket');
  8405.                 END;
  8406.             END;
  8407.         END;
  8408.     END;
  8409. END.
  8410.  
  8411. æKY ATPLoad
  8412. æFc AppleTalk.h
  8413. æT Function
  8414. æD pascal OSErr ATPLoad(void); 
  8415. æDT OSErr myVariable = ATPLoad()(void);
  8416. æMM
  8417. æRT 20, 224
  8418. æRI II-290, N20-2
  8419. æC 
  8420. •••Refer to Technical Note #224:•••
  8421.  
  8422. ATPLoad first verifies that the .MPP driver is loaded and running. If it isn’t,
  8423. ATPLoad verifies that port B is configured for AppleTalk and isn’t in use, and then
  8424. loads MPP into the system heap.
  8425.  
  8426. ATPLoad then loads the .ATP driver, unless it’s already in memory. On a Macintosh
  8427. 128K, ATPLoad reads the .ATP driver from the system resource file into the application
  8428. heap; on a Macintosh 512K or XL, ATP is read into the system heap.
  8429.  
  8430. Note:  On a Macintosh 512K or XL, ATPLoad and MPPOpen perform essentially
  8431.        the same function.
  8432.  
  8433. Result codes    noErr        No error
  8434.                 portInUse    Port B is already in use
  8435.                 portNotCf    Port B not configured for AppleTalk
  8436.  
  8437. æKY ATPUnload
  8438. æFc AppleTalk.h
  8439. æT Function
  8440. æD pascal OSErr ATPUnload(void); 
  8441. æDT OSErr myVariable = ATPUnload()(void);
  8442. æRI II-290
  8443. æC 
  8444. ATPUnload makes the .ATP driver purgeable; the space isn’t actually released by the
  8445. Memory Manager until necessary.
  8446.  
  8447. Note:  This call applies only to a Macintosh 128K; on a Macintosh 512K
  8448.        or Macintosh XL, ATPUnload has no effect.
  8449.  
  8450. Result codes    noErr    No error
  8451.  
  8452. æKY ATPOpenSocket
  8453. æFc AppleTalk.h
  8454. æT Function
  8455. æD pascal OSErr ATPOpenSocket(const AddrBlock *addrRcvd,char *atpSocket); 
  8456. æDT OSErr myVariable = ATPOpenSocket((const AddrBlock *) addrRcvd,(char *) atpSocket);
  8457. æMM
  8458. æRI II-290
  8459. æC 
  8460.  
  8461. æKY ATPCloseSocket
  8462. æFc AppleTalk.h
  8463. æT Function
  8464. æD pascal OSErr ATPCloseSocket(char atpSocket); 
  8465. æDT OSErr myVariable = ATPCloseSocket((char) atpSocket);
  8466. æMM
  8467. æRI II-291
  8468. æC 
  8469. ATPCloseSocket closes the responding socket whose number is specified by atpSocket.
  8470. It releases the data structures associated with all pending, asynchronous calls
  8471. involving that socket; these pending calls are completed immediately and return the
  8472. result code sktClosed.
  8473.  
  8474. Result codes    noErr         No error
  8475.                 noDataArea    Too many outstanding ATP calls
  8476.  
  8477. æKY ATPSndRequest
  8478. æFc AppleTalk.h
  8479. æT Function
  8480. æD pascal OSErr ATPSndRequest(ATATPRecHandle abRecord,Boolean async); 
  8481. æDT OSErr myVariable = ATPSndRequest((ATATPRecHandle) abRecord,(Boolean) async);
  8482. æMM
  8483. æRI II-291
  8484. æC 
  8485. ABusRecord
  8486.   <--    abOpcode         {always tATPSndRequest}
  8487.   <--    abResult         {result code}
  8488.   -->    abUserReference  {for your use}
  8489.   -->    atpAddress       {destination socket address}
  8490.   -->    atpReqCount      {request size in bytes}
  8491.   -->    atpDataPtr       {pointer to buffer}
  8492.   -->    atpRspBDSPtr     {pointer to response BDS}
  8493.   -->    atpUserData      {user bytes}
  8494.   -->    atpXO            {exactly-once flag}
  8495.   <--    atpEOM           {end-of-message flag}
  8496.   -->    atpTimeOut       {retry timeout interval in seconds}
  8497.   -->    atpRetries       {maximum number of retries}
  8498.   -->    atpNumBufs       {number of elements in response BDS}
  8499.   <--    atpNumRsp        {number of response packets actually received}
  8500.  
  8501. ATPSndRequest sends a request to another socket. ATPAddress is the internet address
  8502. of the socket to which the request should be sent. ATPDataPtr and atpReqCount specify
  8503. the location and size of a buffer that contains the request information to be sent.
  8504. ATPUserData contains the user bytes for the ATP header.
  8505.  
  8506. ATPSndRequest requires you to allocate a response BDS. ATPRspBDSPtr is a pointer to
  8507. the response BDS; atpNumBufs indicates the number of elements in the BDS (this is
  8508. also the maximum number of response datagrams that will be accepted). The number of
  8509. response datagrams actually received is returned in atpNumRsp; if a nonzero value is
  8510. returned, you can examine the response BDS to determine which packets of the transaction
  8511. were actually received. If the number returned is less than requested, one of the
  8512. following is true:
  8513.  
  8514.   •  Some of the packets have been lost and the retry count has been exceeded.
  8515.   •  ATPEOM is TRUE; this means that the response consisted of fewer packets
  8516.      than were expected, but that all packets sent were received (the last
  8517.      packet came with the atpEOM flag set).
  8518.  
  8519. ATPTimeOut indicates the length of time that ATPSndRequest should wait for a response
  8520. before retransmitting the request. ATPRetries indicates the maximum number of retries
  8521. ATPSndRequest should attempt. ATPXO should be TRUE if you want the request to be part
  8522. of an exactly-once transaction.
  8523.  
  8524. ATPSndRequest completes when either the transaction is completed or the retry count
  8525. is exceeded.
  8526.  
  8527. Result codes    noErr          No error
  8528.                 reqFailed      Retry count exceeded
  8529.                 tooManyReqs    Too many concurrent requests
  8530.                 noDataArea     Too many outstanding ATP calls
  8531.  
  8532. æKY ATPRequest
  8533. æFc AppleTalk.h
  8534. æT Function
  8535. æD pascal OSErr ATPRequest(ATATPRecHandle abRecord,Boolean async); 
  8536. æDT OSErr myVariable = ATPRequest((ATATPRecHandle) abRecord,(Boolean) async);
  8537. æMM
  8538. æRI II-292
  8539. æC 
  8540. ABusRecord
  8541.   <--    abOpcode         {always tATPRequest}
  8542.   <--    abResult         {result code}
  8543.   -->    abUserReference  {for your use}
  8544.   -->    atpAddress       {destination socket address}
  8545.   -->    atpReqCount      {request size in bytes}
  8546.   -->    atpDataPtr       {pointer to buffer}
  8547.   <--    atpActCount      {number of bytes actually received}
  8548.   -->    atpUserData      {user bytes}
  8549.   -->    atpXO            {exactly-once flag}
  8550.   <--    atpEOM           {end-of-message flag}
  8551.   -->    atpTimeOut       {retry timeout interval in seconds}
  8552.   -->    atpRetries       {maximum number of retries}
  8553.   <--    atpRspUData      {user bytes received in transaction response}
  8554.   -->    atpRspBuf        {pointer to response message buffer}
  8555.   -->    atpRspSize       {size of response message buffer}
  8556.  
  8557. ATPRequest is functionally analogous to ATPSndRequest. It sends a request to another
  8558. socket, but doesn’t require the caller to set up and use the BDS data structure to
  8559. describe the response buffers. ATPAddress indicates the socket to which the request
  8560. should be sent. ATPDataPtr and atpReqCount specify the location and size of a buffer
  8561. that contains the request information to be sent. ATPUserData contains the user bytes
  8562. to be sent in the request’s ATP header. ATPTimeOut indicates the length of time that
  8563. ATPRequest should wait for a response before retransmitting the request. ATPRetries
  8564. indicates the maximum number of retries ATPRequest should attempt.
  8565.  
  8566. To use this call, you must have an area of contiguous buffer space that’s large
  8567. enough to receive all expected datagrams. The various datagrams will be assembled in
  8568. this buffer and returned to you as a complete message upon completion of the transaction.
  8569. The location and size of this buffer are passed in atpRspBuf and atpRspSize. Upon
  8570. completion of the call, the size of the received response message is returned in
  8571. atpActCount. The user bytes received in the ATP header of the first response packet
  8572. are returned in atpRspUData. ATPXO should be TRUE if you want the request to be part
  8573. of an exactly-once transaction.
  8574.  
  8575. Although you don’t provide a BDS, ATPRequest in fact creates one and calls the
  8576. .ATP driver (as in an ATPSndRequest call). For this reason, the abRecord fields
  8577. atpRspBDSPtr and atpNumBufs are used by ATPRequest; you should not expect these
  8578. fields to remain unaltered during or after the function’s execution.
  8579.  
  8580. For ATPRequest to receive and correctly deliver the response as a single message, the
  8581. responding end must, upon receiving the request (with an ATPGetRequest call), generate
  8582. the complete response as a message in a single buffer and then call ATPResponse.
  8583.  
  8584. Note:  The responding end could also use ATPSndRsp and ATPAddRsp provided
  8585.        that each response packet (except the last one) contains exactly 578
  8586.        ATP data bytes; the last packet in the response can contain less than
  8587.        578 ATP data bytes. Also, if this method is used, only the ATP user
  8588.        bytes of the first response packet will be delivered to the requester;
  8589.        any information in the user bytes of the remaining response packets
  8590.        will not be delivered.
  8591.  
  8592. ATPRequest completes when either the transaction is completed or the retry count is
  8593. exceeded.
  8594.  
  8595. Result codes    noErr          No error
  8596.                 reqFailed      Retry count exceeded
  8597.                 tooManyReqs    Too many concurrent requests
  8598.                 sktClosed      Socket closed by a cancel call
  8599.                 noDataArea     Too many outstanding ATP calls
  8600.  
  8601. æKY ATPReqCancel
  8602. æFc AppleTalk.h
  8603. æT Function
  8604. æD pascal OSErr ATPReqCancel(ATATPRecHandle abRecord,Boolean async); 
  8605. æDT OSErr myVariable = ATPReqCancel((ATATPRecHandle) abRecord,(Boolean) async);
  8606. æMM
  8607. æRI II-293
  8608. æC 
  8609. Given the handle to the ABusRecord of a previously made ATPSndRequest or ATPRequest
  8610. call, ATPReqCancel dequeues the ATPSndRequest or ATPRequest call, provided that the
  8611. call hasn’t already completed. ATPReqCancel returns noErr if the ATPSndRequest or
  8612. ATPRequest call is successfully removed from the queue. If it returns cbNotFound,
  8613. check the abResult field of abRecord to verify that the ATPSndRequest or ATPRequest
  8614. call has completed and determine its outcome.
  8615.  
  8616. Result codes    noErr         No error
  8617.                 cbNotFound    ATP control block not found
  8618.  
  8619. æKY ATPGetRequest
  8620. æFc AppleTalk.h
  8621. æT Function
  8622. æD pascal OSErr ATPGetRequest(ATATPRecHandle abRecord,Boolean async); 
  8623. æDT OSErr myVariable = ATPGetRequest((ATATPRecHandle) abRecord,(Boolean) async);
  8624. æMM
  8625. æRT 20
  8626. æRI II-293, N20-2
  8627. æC  
  8628. ABusRecord
  8629.   <--    abOpcode         {always tATPGetRequest}
  8630.   <--    abResult         {result code}
  8631.   -->    abUserReference  {for your use}
  8632.   -->    atpSocket        {listening socket number}
  8633.   <--    atpAddress       {source socket address}
  8634.   -->    atpReqCount      {buffer size in bytes}
  8635.   -->    atpDataPtr       {pointer to buffer}
  8636.   <--    atpBitMap        {transaction bit map}
  8637.   <--    atpTransID       {transaction ID}
  8638.   <--    atpActCount      {number of bytes actually received}
  8639.   <--    atpUserData      {user bytes}
  8640.   <--    atpXO            {exactly-once flag}
  8641.  
  8642. ATPGetRequest sets up the mechanism to receive a request sent by either an ATPSndRequest
  8643. or an ATPRequest call. ATPSocket contains the socket number of the socket that should
  8644. listen for a request; this socket must already have been opened by calling ATPOpenSocket.
  8645. The address of the socket from which the request was sent is returned in atpAddress.
  8646. ATPDataPtr specifies a buffer to store the incoming request; atpReqCount indicates
  8647. the size of the buffer in bytes. The number of bytes actually received in the request
  8648. is returned in atpActCount. ATPUserData contains the user bytes from the ATP header.
  8649. The transaction bit map is returned in atpBitMap. The transaction ID is returned in
  8650. atpTransID. ATPXO will be TRUE if the request is part of an exactly-once transaction.
  8651.  
  8652. ATPGetRequest completes when a request is received. To cancel an asynchronous ATPGetRequest
  8653. call, you must call ATPCloseSocket, but this cancels all pending calls involving that
  8654. socket.
  8655.  
  8656. Result codes    noErr        No error
  8657.                 badATPSkt    Bad responding socket
  8658.                 sktClosed    Socket closed by a cancel call
  8659.  
  8660. æKY ATPSndRsp
  8661. æFc AppleTalk.h
  8662. æT Function
  8663. æD pascal OSErr ATPSndRsp(ATATPRecHandle abRecord,Boolean async); 
  8664. æDT OSErr myVariable = ATPSndRsp((ATATPRecHandle) abRecord,(Boolean) async);
  8665. æMM
  8666. æRI II-294
  8667. æC  
  8668. ABusRecord
  8669.   <--    abOpcode         {always tATPSdRsp}
  8670.   <--    abResult         {result code}
  8671.   -->    abUserReference  {for your use}
  8672.   -->    atpSocket        {responding socket number}
  8673.   -->    atpAddress       {destination socket address}
  8674.   -->    atpRspBDSPtr     {pointer to response BDS}
  8675.   -->    atpTransID       {transaction ID}
  8676.   -->    atpEOM           {end-of-message flag}
  8677.   -->    atpNumBufs       {number of response packets being sent}
  8678.   -->    atpBDSSize       {number of elements in response BDS}
  8679.  
  8680. ATPSndRsp sends a response to another socket. ATPSocket contains the socket number
  8681. from which the response should be sent and atpAddress contains the internet address
  8682. of the socket to which the response should be sent. ATPTransID must contain the
  8683. transaction ID. ATPEOM is TRUE if the response BDS contains the final packet in a
  8684. transaction composed of a group of packets and the number of packets in the response
  8685. is less than expected. ATPRspBDSPtr points to the buffer data structure containing
  8686. the responses to be sent. ATPBDSSize indicates the number of elements in the response
  8687. BDS, and must be in the range 1 to 8. ATPNumBufs indicates the number of response
  8688. packets being sent with this call, and must be in the range 0 to 8.
  8689.  
  8690. Note:  In some situations, you may want to send only part (or possibly none)
  8691.        of your response message back immediately. For instance, you might be
  8692.        requested to send back seven disk blocks, but have only enough internal
  8693.        memory to store one block. In this case, set atpBDSSize to 7 (total
  8694.        number of response packets), atpNumBufs to 0 (number of response
  8695.        packets currently being sent), and call ATPSndRsp. Then as you read
  8696.        in one block at a time, call ATPAddRsp until all seven response
  8697.        datagrams have been sent.
  8698.  
  8699. During exactly-once transactions, ATPSndRsp won’t complete until the release packet
  8700. is received or the release timer expires.
  8701.  
  8702. Result codes    noErr         No error
  8703.                 badATPSkt     Bad responding socket
  8704.                 noRelErr      No release received
  8705.                 sktClosed     Socket closed by a cancel call
  8706.                 noDataArea    Too many outstanding ATP calls
  8707.                 badBuffNum    Bad sequence number
  8708.  
  8709. æKY ATPAddRsp
  8710. æFc AppleTalk.h
  8711. æT Function
  8712. æD pascal OSErr ATPAddRsp(ATATPRecHandle abRecord); 
  8713. æDT OSErr myVariable = ATPAddRsp((ATATPRecHandle) abRecord);
  8714. æMM
  8715. æRI II-295
  8716. æC  
  8717. ABusRecord
  8718.   <--    abOpcode         {always tATPAddRsp}
  8719.   <--    abResult         {result code}
  8720.   -->    abUserReference  {for your use}
  8721.   -->    atpSocket        {responding socket number}
  8722.   -->    atpAddress       {destination socket address}
  8723.   -->    atpReqCount      {buffer size in bytes}
  8724.   -->    atpDataPtr       {pointer to buffer}
  8725.   -->    atpTransID       {transaction ID}
  8726.   -->    atpUserData      {user bytes}
  8727.   -->    atpEOM           {end-of-message flag}
  8728.   -->    atpNumRsp        {sequence number}
  8729.  
  8730. ATPAddRsp sends one additional response packet to a socket that has already been sent
  8731. the initial part of a response via ATPSndRsp. ATPSocket contains the socket number
  8732. from which the response should be sent and atpAddress contains the internet address
  8733. of the socket to which the response should be sent. ATPTransID must contain the
  8734. transaction ID. ATPDataPtr and atpReqCount specify the location and size of a buffer
  8735. that contains the information to send; atpNumRsp is the sequence number of the response.
  8736. ATPEOM is TRUE if this response datagram is the final packet in a transaction composed
  8737. of a group of packets. ATPUserData contains the user bytes to be sent in this response
  8738. datagram’s ATP header.
  8739.  
  8740. Note:  No BDS is needed with ATPAddRsp because all pertinent information
  8741.        is passed within the record.
  8742.  
  8743. Result codes    noErr         No error
  8744.                 badATPSkt     Bad responding socket
  8745.                 badBuffNum    Bad sequence number
  8746.                 noSendResp    ATPAddRsp issued before ATPSndRsp
  8747.                 noDataArea    Too many outstanding ATP calls
  8748.  
  8749. æKY ATPResponse
  8750. æFc AppleTalk.h
  8751. æT Function
  8752. æD pascal OSErr ATPResponse(ATATPRecHandle abRecord,Boolean async); 
  8753. æDT OSErr myVariable = ATPResponse((ATATPRecHandle) abRecord,(Boolean) async);
  8754. æMM
  8755. æRT 20
  8756. æRI II-296, N20-2
  8757. æC 
  8758. ABusRecord
  8759.   <--    abOpcode         {always tATPResponse}
  8760.   <--    abResult         {result code}
  8761.   -->    abUserReference  {for your use}
  8762.   -->    atpSocket        {responding socket number}
  8763.   -->    atpAddress       {destination socket address}
  8764.   -->    atpTransID       {transaction ID)
  8765.   -->    atpRspUData      {user bytes sent in transaction response}
  8766.   -->    atpRspBuf        {pointer to response message buffer}
  8767.   -->    atpRspSize       {size of response message buffer}
  8768.  
  8769. ATPResponse is functionally analogous to ATPSndRsp. It sends a response to another
  8770. socket, but doesn’t require the caller to provide a BDS. ATPAddress must contain the
  8771. complete network address of the socket to which the response should be sent (taken
  8772. from the data provided by an ATPGetRequest call). ATPTransID must contain the transaction
  8773. ID. ATPSocket indicates the socket from which the response should be sent (the socket
  8774. on which the corresponding ATPGetRequest was issued). ATPRspBuf points to the buffer
  8775. containing the response message; the size of this buffer must be passed in atpRspSize.
  8776. The four user bytes to be sent in the ATP header of the first response packet are
  8777. passed in atpRspUData. The last packet of the transaction response is sent with the
  8778. EOM flag set.
  8779.  
  8780. Although you don’t provide a BDS, ATPResponse in fact creates one and calls the .ATP
  8781. driver (as in an ATPSndRsp call). For this reason, the abRecord fields atpRspBDSPtr
  8782. and atpNumBufs are used by ATPResponse; you should not expect these fields to remain
  8783. unaltered during or after the function’s execution.
  8784.  
  8785. During exactly-once transactions ATPResponse won’t complete until the release packet
  8786. is received or the release timer expires.
  8787.  
  8788. Warning:  The maximum permissible size of the response message is 4624 bytes.
  8789.  
  8790. Result codes    noErr         No error
  8791.                 badATPSkt     Bad responding socket
  8792.                 noRelErr      No release received
  8793.                 atpLenErr     Response too big
  8794.                 sktClosed     Socket closed by a cancel call
  8795.                 noDataArea    Too many outstanding ATP calls
  8796.  
  8797. æKY ATPRspCancel
  8798. æFc AppleTalk.h
  8799. æT Function
  8800. æD pascal OSErr ATPRspCancel(ATATPRecHandle abRecord,Boolean async); 
  8801. æDT OSErr myVariable = ATPRspCancel((ATATPRecHandle) abRecord,(Boolean) async);
  8802. æMM
  8803. æRI II-296
  8804. æC 
  8805. Given the handle to the ABusRecord of a previously made ATPSndRsp or ATPResponse
  8806. call, ATPRspCancel dequeues the ATPSndRsp or ATPResponse call, provided that the call
  8807. hasn’t already completed. ATPRspCancel returns noErr if the ATPSndRsp or ATPResponse
  8808. call is successfully removed from the queue. If it returns cbNotFound, check the
  8809. abResult field of abRecord to verify that the ATPSndRsp or ATPResponse call has
  8810. completed and determine its outcome.
  8811.  
  8812. Result codes    noErr         No error
  8813.                 cbNotFound    ATP control block not found
  8814.  
  8815. »Example
  8816.  
  8817. This example shows the requesting side of an ATP transaction that asks for a 512-byte
  8818. disk block from the responding end. The block number of the file is a byte and is
  8819. contained in myBuffer[0].
  8820.  
  8821. VAR
  8822.   myABRecord: ABRecHandle;
  8823.   myBDSPtr: BDSPtr;
  8824.   myBuffer: PACKED ARRAY [0..511] OF CHAR;
  8825.   errCode: INTEGER;
  8826.   async: BOOLEAN;
  8827.  
  8828. BEGIN
  8829.   errCode := ATPLoad;
  8830.   IF errCode <> noErr THEN
  8831.     WRITELN('Error in opening AppleTalk')
  8832.     {Maybe serial port B isn't available for use by AppleTalk}
  8833.   ELSE
  8834.     BEGIN
  8835.       {Prepare the BDS; allocate space for a one-element BDS}
  8836.       myBDSPtr := BDSPtr(NewPtr(SIZEOF(BDSElement)));
  8837.       WITH myBDSPtr^[0] DO
  8838.         BEGIN
  8839.           buffSize := 512; {size of our buffer used in reception}
  8840.           buffPtr := @myBuffer; {pointer to the buffer}
  8841.         END;
  8842.       {Prepare the ABusRecord}
  8843.       myBuffer[0] := CHR(1); {requesting disk block number 1}
  8844.       myABRecord := ABRecHandle(NewHandle(atpSize));
  8845.       WITH myABRecord^^ DO
  8846.         BEGIN
  8847.           atpAddress.aNet := 0;
  8848.           atpAddress.aNode := 30; {we probably got this from an NBP call}
  8849.           atpAddress.aSocket := 15; {socket to send request to}
  8850.           atpReqCount := 1; {size of request data field (disk block #)}
  8851.           atpDataPtr := @myBuffer; {ptr to request to be sent}
  8852.           atpRspBDSPtr := @myBDSPtr;
  8853.           atpUserData := 0; {for your use}
  8854.           atpXO := FALSE; {at-least-once service}
  8855.           atpTimeOut := 5; {5-second timeout}
  8856.           atpRetries := 3; {3 retries; request will be sent 4 times max}
  8857.           atpNumBufs := 1; {we're only expecting 1 block to be returned}
  8858.         END;
  8859.       async := FALSE;
  8860.       {Send the request and wait for the response}
  8861.       errCode := ATPSndRequest(myABRecord, async);
  8862.       IF errCode <> noErr THEN
  8863.         WRITELN('An error occurred in the ATPSndRequest call')
  8864.       ELSE
  8865.         BEGIN
  8866.           {The disk block requested is now in myBuffer. We can verify }
  8867.           { that atpNumRsp contains 1, meaning one response received.}
  8868.         . . .
  8869.         END;
  8870.     END;
  8871. END.
  8872.  
  8873. æKY NBPRegister
  8874. æFc AppleTalk.h
  8875. æT Function
  8876. æD pascal OSErr NBPRegister(ATNBPRecHandle abRecord,Boolean async); 
  8877. æDT OSErr myVariable = NBPRegister((ATNBPRecHandle) abRecord,(Boolean) async);
  8878. æMM
  8879. æRT 20
  8880. æRI II-299, N20-2
  8881. æC 
  8882. ABusRecord
  8883.   <--    abOpcode            {always tNBPRegister}
  8884.   <--    abResult            {result code}
  8885.   -->    abUserReference     {for your use}
  8886.   -->    nbpEntityPtr        {pointer to entity name}
  8887.   -->    nbpBufPtr           {pointer to buffer}
  8888.   -->    nbpBufSize          {buffer size in bytes}
  8889.   -->    nbpAddress.aSocket  {socket address}
  8890.   -->    nbpRetransmitInfo   {retransmission information}
  8891.  
  8892. NBPRegister adds the name and address of an entity to the node’s names table. NBPEntityPtr
  8893. points to a variable of type EntityName containing the entity’s name. If the name is
  8894. already registered, NBPRegister returns the result code nbpDuplicate. NBPAddress
  8895. indicates the socket for which the name should be registered. NBPBufPtr and nbpBufSize
  8896. specify the location and size of a buffer for NBP to use internally.
  8897.  
  8898. While the variable of type EntityName is declared as three 32-byte strings, only the
  8899. actual characters of the name are placed in the buffer pointed to by nbpBufPtr. For
  8900. this reason, nbpBufSize needs only to be equal to the actual length of the name, plus
  8901. an additional 12 bytes for use by NBP.
  8902.  
  8903. Warning:  This buffer must not be altered or released until the name is
  8904.           removed from the names table via an NBPRemove call. If you
  8905.           allocate the buffer through a NewHandle call, you must lock
  8906.           it as long as the name is registered.
  8907.  
  8908. Warning:  The zone field of the entity name must be set to the
  8909.           meta-character “*”.
  8910.  
  8911. Result codes    noErr           No error
  8912.                 nbpDuplicate    Duplicate name already exists
  8913.  
  8914. æKY NBPLookup
  8915. æFc AppleTalk.h
  8916. æT Function
  8917. æD pascal OSErr NBPLookup(ATNBPRecHandle abRecord,Boolean async); 
  8918. æDT OSErr myVariable = NBPLookup((ATNBPRecHandle) abRecord,(Boolean) async);
  8919. æMM
  8920. æRT 9, 20
  8921. æRI II-300, N9-1, 2, N20-2 
  8922. æC 
  8923. ABusRecord
  8924.   <--    abOpcode           {always tNBPLookup}
  8925.   <--    abResult           {result code}
  8926.   -->    abUserReference    {for your use}
  8927.   -->    nbpEntityPtr       {pointer to entity name}
  8928.   -->    nbpBufPtr          {pointer to buffer}
  8929.   -->    nbpBufSize         {buffer size in bytes}
  8930.   <->    nbpDataField       {number of addresses received}
  8931.   -->    nbpRetransmitInfo  {retransmission information}
  8932.  
  8933. NBPLookup returns the addresses of all entities with a specified name. NBPEntityPtr
  8934. points to a variable of type EntityName containing the name of the entity whose
  8935. address should be returned. (Meta-characters are allowed in the entity name.) NBPBufPtr
  8936. and nbpBufSize contain the location and size of an area of memory in which the entity
  8937. names and their corresponding addresses should be returned. NBPDataField indicates
  8938. the maximum number of matching names to find addresses for; the actual number of
  8939. addresses found is returned in nbpDataField. NBPRetransmitInfo contains the retry
  8940. interval and the retry count.
  8941.  
  8942. When specifying nbpBufSize, for each NBP tuple expected, allow space for the actual
  8943. characters of the name, the address, and four bytes for use by NBP.
  8944.  
  8945. Result codes    noErr         No error
  8946.                 nbpBuffOvr    Buffer overflow
  8947.  
  8948. æKY NBPExtract
  8949. æFc AppleTalk.h
  8950. æT Function
  8951. æD pascal OSErr NBPExtract(Ptr theBuffer,short numInBuf,short whichOne,EntityName *abEntity,
  8952.     AddrBlock *address); 
  8953. æDT OSErr myVariable = NBPExtract((Ptr) theBuffer,(short) numInBuf,(short) whichOne,(EntityName *) abEntity,(
  8954.     AddrBlock) * address);
  8955. æMM
  8956. æRI II-300,V-515
  8957. æC 
  8958. This routine is provided in the alternate interface, but can be used as provided for
  8959. extracting NBP entity names from a look-up response buffer.
  8960.  
  8961. NBPExtract returns one address from the list of addresses returned by NBPLookup.
  8962. TheBuffer and numInBuf indicate the location and number of tuples in the buffer.
  8963. WhichOne specifies which one of the tuples in the buffer should be returned in the
  8964. abEntity and address parameters.
  8965.  
  8966. Result codes    noErr         No error
  8967.                 extractErr    Can’t find tuple in buffer
  8968.  
  8969. æKY NBPConfirm
  8970. æFc AppleTalk.h
  8971. æT Function
  8972. æD pascal OSErr NBPConfirm(ATNBPRecHandle abRecord,Boolean async); 
  8973. æDT OSErr myVariable = NBPConfirm((ATNBPRecHandle) abRecord,(Boolean) async);
  8974. æMM
  8975. æRT 9
  8976. æRI II-301, N9-2
  8977. æC 
  8978. ABusRecord
  8979.   <--    abOpcode           {always tNBPConfirm}
  8980.   <--    abResult           {result code}
  8981.   -->    abUserReference    {for your use}
  8982.   -->    nbpEntityPtr       {pointer to entity name}
  8983.   <--    nbpDataField       {socket number}
  8984.   -->    nbpAddress         {socket address}
  8985.   -->    nbpRetransmitInfo  {retransmission information}
  8986.  
  8987. NBPConfirm confirms that an entity known by name and address still exists (is still
  8988. entered in the names directory). NBPEntityPtr points to a variable of type EntityName
  8989. that contains the name to confirm, and nbpAddress specifies the address to be confirmed.
  8990. (No meta-characters are allowed in the entity name.) NBPRetransmitInfo contains the
  8991. retry interval and the retry count. The socket number of the entity is returned in
  8992. nbpDataField. NBPConfirm is more efficient than NBPLookup in terms of network traffic.
  8993.  
  8994. Result codes    noErr           No error
  8995.                 nbpConfDiff     Name confirmed for different socket
  8996.                 nbpNoConfirm    Name not confirmed
  8997.  
  8998. æKY NBPRemove
  8999. æFc AppleTalk.h
  9000. æT Function
  9001. æD pascal OSErr NBPRemove(EntityPtr abEntity); 
  9002. æDT OSErr myVariable = NBPRemove((EntityPtr) abEntity);
  9003. æMM
  9004. æRI II-301
  9005. æC 
  9006. NBPRemove removes an entity name from the names table of the given entity’s node.
  9007.  
  9008. Result codes    noErr          No error
  9009.                 nbpNotFound    Name not found
  9010.  
  9011. æKY NBPLoad
  9012. æFc AppleTalk.h
  9013. æT Function
  9014. æD pascal OSErr NBPLoad(void); 
  9015. æDT OSErr myVariable = NBPLoad()(void);
  9016. æMM
  9017. æRI II-301
  9018. æC 
  9019. On a Macintosh 128K, NBPLoad reads the NBP code from the system resource file into
  9020. the application heap. On a Macintosh 512K or XL, NBPLoad has no effect since the NBP
  9021. code should have already been loaded when the .MPP driver was opened. Normally you’ll
  9022. never need to call NBPLoad, because the AppleTalk Manager calls it when necessary.
  9023.  
  9024. Result codes    noErr    No error
  9025.  
  9026. æKY NBPUnload
  9027. æFc AppleTalk.h
  9028. æT Function
  9029. æD pascal OSErr NBPUnload(void); 
  9030. æDT OSErr myVariable = NBPUnload()(void);
  9031. æMM
  9032. æRI II-301
  9033. æC 
  9034. On a Macintosh 128K, NBPUnload makes the NBP code purgeable; the space isn’t actually
  9035. released by the Memory Manager until necessary. On a Macintosh 512K or Macintosh XL,
  9036. NBPUnload has no effect.
  9037.  
  9038. Result codes    noErr    No error
  9039.  
  9040. »Example
  9041.  
  9042. This example of NBP registers our node as a print spooler, searches for any print
  9043. spoolers registered on the network, and then extracts the information for the first
  9044. one found.
  9045.  
  9046. CONST
  9047.   mySocket = 20;
  9048.  
  9049. VAR
  9050.   myABRecord: ABRecHandle;
  9051.   myEntity: EntityName;
  9052.   entityAddr: AddrBlock;
  9053.   nbpNamePtr: Ptr;
  9054.   myBuffer: PACKED ARRAY [0..999] OF CHAR;
  9055.   errCode: INTEGER;
  9056.   async: BOOLEAN;
  9057.  
  9058. BEGIN
  9059.   errCode := MPPOpen;
  9060.   IF errCode <> noErr THEN
  9061.     WRITELN('Error in opening AppleTalk')
  9062.     {Maybe serial port B isn't available for use by AppleTalk}
  9063.   ELSE
  9064.     BEGIN
  9065.       {Call Memory Manager to allocate ABusRecord}
  9066.       myABRecord := ABRecHandle(NewHandle(nbpSize));
  9067.       {Set up our entity name to register}
  9068.       WITH myEntity DO
  9069.         BEGIN
  9070.           objStr := 'Gene Station'; {we are called 'Gene Station' }
  9071.           typeStr := 'PrintSpooler'; { and are of type 'PrintSpooler'}
  9072.           zoneStr := '*';
  9073.           {Allocate data space for the entity name (used by NBP)}
  9074.           nbpNamePtr := NewPtr(LENGTH(objStr) + LENGTH(typeStr) +
  9075.                                LENGTH(zoneStr) + 12);
  9076.         END;
  9077.       {Set up the ABusRecord for the NBPRegister call}
  9078.       WITH myABRecord^^ DO
  9079.         BEGIN
  9080.           nbpEntityPtr := @myEntity;
  9081.           nbpBufPtr := nbpNamePtr; {buffer used by NBP internally}
  9082.           nbpBufSize := nbpNameBufSize;
  9083.           nbpAddress.aSocket := mySocket; {socket to register us on}
  9084.           nbpRetransmitInfo.retransInterval := 8; {retransmit every 64 }
  9085.           nbpRetransmitInfo.retransCount := 3; { ticks and try 3 times}
  9086.         END;
  9087.       async := FALSE;
  9088.       errCode := NBPRegister(myABRecord, async);
  9089.       IF errCode <> noErr THEN
  9090.         WRITELN('Error occurred in the NBPRegister call')
  9091.         {Maybe the name is already registered somewhere else on the }
  9092.         { network.}
  9093.       ELSE
  9094.         BEGIN
  9095.           {Now that we've registered our name, find others of type }
  9096.           { 'PrintSpooler'.}
  9097.           WITH myEntity DO
  9098.             BEGIN
  9099.               objStr := '='; {any one of type }
  9100.               typeStr := 'PrintSpooler'; { “PrintSpooler” }
  9101.               zoneStr := '*'; { in our zone}
  9102.             END;
  9103.           WITH myABRecord^^ DO
  9104.             BEGIN
  9105.               nbpEntityPtr := @myEntity;
  9106.               nbpBufPtr := @myBuffer; {buffer to place responses in}
  9107.               nbpBufSize := SIZEOF(myBuffer);
  9108.              {The field nbpDataField, before the NBPLookup call, represents an }
  9109.               { approximate number of responses. After the call, nbpDataField }
  9110.               { contains the actual number of responses received.}
  9111.               nbpDataField := 100; {we want about 100 responses back}
  9112.             END;
  9113.           errCode := NBPLookup(myABRecord, async); {make sync call}
  9114.           IF errCode <> noErr THEN
  9115.             WRITELN('An error occurred in the NBPLookup')
  9116.             {Did the buffer overflow?}
  9117.           ELSE
  9118.             BEGIN
  9119.               {Get the first reply}
  9120.               errCode := NBPExtract(@mybuffer, myABRecord^^.nbpDataField, 1,
  9121.                                     myEntity, entityAddr);
  9122.            {The socket address and name of the entity are returned here. If we }
  9123.              { want all of them, we'll have to loop for each one in the buffer.}
  9124.               IF errCode <> noErr THEN WRITELN('Error in NBPExtract');
  9125.               {Maybe the one we wanted wasn't in the buffer}
  9126.             END;
  9127.         END;
  9128.     END;
  9129. END.
  9130.  
  9131. æKY GetNodeAddress
  9132. æFc AppleTalk.h
  9133. æT Function
  9134. æD pascal OSErr GetNodeAddress(short *myNode,short *myNet); 
  9135. æDT OSErr myVariable = GetNodeAddress((short *) myNode,(short *) myNet);
  9136. æRI II-303
  9137. æC 
  9138. GetNodeAddress returns the current node ID and network number of the caller. If the
  9139. .MPP driver isn’t installed, it returns noMPPErr. If myNet contains 0, this means
  9140. that a bridge hasn’t yet been found.
  9141.  
  9142. Result codes    noErr       No error
  9143.                 noMPPErr    MPP driver not installed
  9144.  
  9145. æKY IsMPPOpen
  9146. æFc AppleTalk.h
  9147. æT Function
  9148. æD pascal Boolean IsMPPOpen(void); 
  9149. æDT Boolean myVariable = IsMPPOpen()(void);
  9150. æRI II-304
  9151. æC 
  9152. [Not in ROM]
  9153.  
  9154. IsMPPOpen returns TRUE if the .MPP driver is loaded and running.
  9155.  
  9156. æKY IsATPOpen
  9157. æFc AppleTalk.h
  9158. æT Function
  9159. æD pascal Boolean IsATPOpen(void); 
  9160. æDT Boolean myVariable = IsATPOpen()(void);
  9161. æRI II-304
  9162. æC 
  9163. [Not in ROM]
  9164.  
  9165. IsATPOpen returns TRUE if the .ATP driver is loaded and running.
  9166.  
  9167. æKY ATEvent
  9168. æFc AppleTalk.h
  9169. æT Function
  9170. æD pascal void ATEvent(long event,Ptr infoPtr); 
  9171. æDT ATEvent((long) event,(Ptr) infoPtr);
  9172. æRI II-304
  9173. æC 
  9174. [Not in ROM]
  9175.  
  9176. IsATPOpen returns TRUE if the .ATP driver is loaded and running.
  9177.  
  9178. æKY ATPreFlightEvent
  9179. æFc AppleTalk.h
  9180. æT Function
  9181. æD pascal OSErr ATPreFlightEvent(long event,long cancel,Ptr infoPtr); 
  9182. æDT OSErr myVariable = ATPreFlightEvent((long) event,(long) cancel,(Ptr) infoPtr);
  9183. æRI II-304
  9184. æC 
  9185. [Not in ROM]
  9186.  
  9187. IsATPOpen returns TRUE if the .ATP driver is loaded and running.
  9188.  
  9189.  
  9190. æKY Assert.h
  9191. æC 
  9192. assert
  9193.  
  9194. #include <Assert.h>
  9195. void assert (int expression);
  9196.  
  9197.                            Description
  9198.  
  9199. The assert; macro allows your program to send diagnostic 
  9200. messages to the user, depending on the evaluation of 
  9201. expression. If expression is false, assert provides an error 
  9202. message, and then calls the abort function. The format for this 
  9203. message is FILE myfile.c; Line 108 ##assertion failed: i<j
  9204.  
  9205. The assert macro can be activated using the NDEBUG macro. If 
  9206. NDEBUG is turned off, assert will evaluate expression.
  9207.  
  9208.                            Note
  9209.  
  9210. The message pointed to by assert is an executable MPW 
  9211. command. When the command is executed, it will open the 
  9212. source file containing the assert and highlight the assert statement.
  9213.  
  9214. Example
  9215. #include <assert.h>
  9216. main()
  9217. {
  9218.  int i,j;
  9219.  i = foo();
  9220.  j = 3;
  9221.  assert (i<100);         /* This depends on the compile-time */
  9222.                          /* setting of NDEBUG. If */
  9223.                          /* NDEBUG is defined,  the assert */
  9224.                          /* statement is not passed from the  */
  9225.                          /* preprocessor to the compiler */
  9226.  #undef NDEBUG           /* Turn off NDEBUG */
  9227.  #include <assert.h>
  9228.  assert (i<j);           /* This assert is turned on */
  9229.  #define NDEBUG          /* Turn on NDEBUG */
  9230.  #include <assert.h>
  9231.  j = foo();
  9232.  assert (j <100);        /* This assert is turned off */
  9233. }
  9234. See also
  9235. abort
  9236.  
  9237. æKY assert
  9238. æFc Assert.h
  9239. æC #include <Assert.h>
  9240. void assert (int expression);
  9241.  
  9242.                            Description
  9243.  
  9244. The assert; macro allows your program to send diagnostic 
  9245. messages to the user, depending on the evaluation of 
  9246. expression. If expression is false, assert provides an error 
  9247. message, and then calls the abort function. The format for this 
  9248. message is FILE myfile.c; Line 108 ##assertion failed: i<j
  9249.  
  9250. The assert macro can be activated using the NDEBUG macro. If 
  9251. NDEBUG is turned off, assert will evaluate expression.
  9252.  
  9253.                            Note
  9254.  
  9255. The message pointed to by assert is an executable MPW 
  9256. command. When the command is executed, it will open the 
  9257. source file containing the assert and highlight the assert statement.
  9258.  
  9259. Example
  9260. #include <assert.h>
  9261. main()
  9262. {
  9263.  int i,j;
  9264.  i = foo();
  9265.  j = 3;
  9266.  assert (i<100);         /* This depends on the compile-time */
  9267.                          /* setting of NDEBUG. If */
  9268.                          /* NDEBUG is defined,  the assert */
  9269.                          /* statement is not passed from the  */
  9270.                          /* preprocessor to the compiler */
  9271.  #undef NDEBUG           /* Turn off NDEBUG */
  9272.  #include <assert.h>
  9273.  assert (i<j);           /* This assert is turned on */
  9274.  #define NDEBUG          /* Turn on NDEBUG */
  9275.  #include <assert.h>
  9276.  j = foo();
  9277.  assert (j <100);        /* This assert is turned off */
  9278. }
  9279. See also
  9280. abort
  9281.  
  9282. æKY assertæ                     
  9283. æDT 
  9284. void myVariable = assert ((int) expression);
  9285.  
  9286. æKY Balloons.h
  9287. æKL HMBalloonPict
  9288. HMBalloonRect
  9289. HMExtractHelpMsg
  9290. HMGetBalloons
  9291. HMGetBalloonWindow
  9292. HMGetDialogResID
  9293. HMGetFont
  9294. HMGetFontSize
  9295. HMGetHelpMenuHandle
  9296. HMGetIndHelpMsg
  9297. HMGetMenuResID
  9298. HMIsBalloon
  9299. HMRemoveBalloon
  9300. HMScanTemplateItems
  9301. HMSetBalloons
  9302. HMSetDialogResID
  9303. HMSetFont
  9304. HMSetFontSize
  9305. HMSetMenuResID
  9306. HMShowBalloon
  9307. HMShowMenuBalloon
  9308.  
  9309. helpItem
  9310. hmAbsoluteCoords
  9311. hmBalloonAborted
  9312. hmBalloonHelpVersion
  9313. hmCloseViewActive
  9314. hmDefaultOptions
  9315. hmHelpDisabled
  9316. hmHelpManagerNotInited
  9317. hmMatchInTitle
  9318. HMMessageRecord
  9319. HMMessageRecPtr
  9320. hmNoBalloonUp
  9321. hmOperationUnsupported
  9322. hmSameAsLastBalloon
  9323. hmSaveBitsNoWindow
  9324. hmSaveBitsWindow
  9325. hmSkippedBalloon
  9326. HMStringResType
  9327. hmUnknownHelpType
  9328. hmUseSubID
  9329. hmWrongVersion
  9330. kBalloonWDEFID
  9331. kHMAboutHelpItem
  9332. kHMCheckedItem
  9333. kHMCompareItem
  9334. kHMDialogResType
  9335. kHMDisabledItem
  9336. kHMEnabledItem
  9337. kHMFinderApplResType
  9338. kHMHelpID
  9339. kHMHelpMenuID
  9340. kHMMenuResType
  9341. khmmPict
  9342. khmmPictHandle
  9343. khmmString
  9344. khmmStringRes
  9345. khmmSTRRes
  9346. khmmTEHandle
  9347. khmmTERes
  9348. kHMNamedResourceItem
  9349. kHMOtherItem
  9350. kHMOverrideResType
  9351. kHMPictItem
  9352. kHMRectListResType
  9353. kHMRegularWindow
  9354. kHMSaveBitsNoWindow
  9355. kHMSaveBitsWindow
  9356. kHMShowBalloonsItem
  9357. kHMSkipItem
  9358. kHMStringItem
  9359. kHMStringResItem
  9360. kHMSTRResItem
  9361. kHMTEResItem
  9362. kHMTEStyleResType
  9363. kHMTETextResType
  9364. kHMTrackCntlItem
  9365. kHMWindListResType
  9366.  
  9367. æKY hmBalloonHelpVersion
  9368. æFc Balloons.h
  9369. æT 
  9370. æD     hmBalloonHelpVersion = 0x0002, /* The real version of the Help Manager */
  9371. æC 
  9372.  
  9373. æKY hmHelpDisabled
  9374. æFc Balloons.h
  9375. æT 
  9376. æD     hmHelpDisabled = -850, /* Show Balloons mode was off, call to routine ignored */
  9377. æC 
  9378.  
  9379. æKY hmBalloonAborted
  9380. æFc Balloons.h
  9381. æT 
  9382. æD     hmBalloonAborted = -853, /* Returned if mouse was moving or mouse wasn't in window port rect */
  9383. æC 
  9384.  
  9385. æKY hmSameAsLastBalloon
  9386. æFc Balloons.h
  9387. æT 
  9388. æD     hmSameAsLastBalloon = -854, /* Returned from HMShowMenuBalloon if menu & item is same as last time */
  9389. æC 
  9390.  
  9391. æKY hmHelpManagerNotInited
  9392. æFc Balloons.h
  9393. æT 
  9394. æD     hmHelpManagerNotInited = -855, /* Returned from HMGetHelpMenuHandle if help menu not setup */
  9395. æC 
  9396.  
  9397. æKY hmSkippedBalloon
  9398. æFc Balloons.h
  9399. æT 
  9400. æD     hmSkippedBalloon = -857, /* Returned from calls if helpmsg specified a skip balloon */
  9401. æC 
  9402.  
  9403. æKY hmWrongVersion
  9404. æFc Balloons.h
  9405. æT 
  9406. æD     hmWrongVersion = -858, /* Returned if help mgr resource was the wrong version */
  9407. æC 
  9408.  
  9409. æKY hmUnknownHelpType
  9410. æFc Balloons.h
  9411. æT 
  9412. æD     hmUnknownHelpType = -859, /* Returned if help msg record contained a bad type */
  9413. æC 
  9414.  
  9415. æKY hmOperationUnsupported
  9416. æFc Balloons.h
  9417. æT 
  9418. æD     hmOperationUnsupported = -861, /* Returned from HMShowBalloon call if bad method passed to routine */
  9419. æC 
  9420.  
  9421. æKY hmNoBalloonUp
  9422. æFc Balloons.h
  9423. æT 
  9424. æD     hmNoBalloonUp = -862, /* Returned from HMRemoveBalloon if no balloon was visible when call was made */
  9425. æC 
  9426.  
  9427. æKY hmCloseViewActive
  9428. æFc Balloons.h
  9429. æT 
  9430. æD     hmCloseViewActive = -863, /* Returned from HMRemoveBalloon if CloseView was active */
  9431. æC 
  9432.  
  9433. æKY kHMHelpMenuID
  9434. æFc Balloons.h
  9435. æT 
  9436. æD     kHMHelpMenuID = -16490, /* Resource ID and menu ID of help menu */
  9437. æC 
  9438.  
  9439. æKY kHMAboutHelpItem
  9440. æFc Balloons.h
  9441. æT 
  9442. æD     kHMAboutHelpItem = 1, /* help menu item number of About Balloon Help… */
  9443. æC 
  9444.  
  9445. æKY kHMShowBalloonsItem
  9446. æFc Balloons.h
  9447. æT 
  9448. æD     kHMShowBalloonsItem = 3, /* help menu item number of Show/Hide Balloons */
  9449. æC 
  9450.  
  9451. æKY kHMHelpID
  9452. æFc Balloons.h
  9453. æT 
  9454. æD     kHMHelpID = -5696, /* ID of various Help Mgr package resources (in Pack14 range) */
  9455. æC 
  9456.  
  9457. æKY kBalloonWDEFID
  9458. æFc Balloons.h
  9459. æT 
  9460. æD     kBalloonWDEFID = 126, /* Resource ID of the WDEF proc used in standard balloons */
  9461. æC 
  9462.  
  9463. æKY helpItem
  9464. æFc Balloons.h
  9465. æT 
  9466. æD     helpItem = 1, /* key value in DITL template that corresponds to the help item */
  9467. æC 
  9468.  
  9469. æKY hmDefaultOptions
  9470. æFc Balloons.h
  9471. æT 
  9472. æD     hmDefaultOptions = 0, /* default options for help manager resources */
  9473. æC 
  9474.  
  9475. æKY hmUseSubID
  9476. æFc Balloons.h
  9477. æT 
  9478. æD     hmUseSubID = 1, /* treat resID's in resources as subID's of driver base ID */
  9479. æC 
  9480.  
  9481. æKY hmAbsoluteCoords
  9482. æFc Balloons.h
  9483. æT 
  9484. æD     hmAbsoluteCoords = 2, /* ignore window port origin and treat rectangles as absolute coords */
  9485. æC 
  9486.  
  9487. æKY hmSaveBitsNoWindow
  9488. æFc Balloons.h
  9489. æT 
  9490. æD     hmSaveBitsNoWindow = 4, /* don't create a window, just blast bits on screen. No update event is generated */
  9491. æC 
  9492.  
  9493. æKY hmSaveBitsWindow
  9494. æFc Balloons.h
  9495. æT 
  9496. æD     hmSaveBitsWindow = 8, /* create a window, but restore bits behind window when window goes away */
  9497. æC 
  9498.  
  9499. æKY hmMatchInTitle
  9500. æFc Balloons.h
  9501. æT 
  9502. æD     hmMatchInTitle = 16, /* for hwin resources, match string anywhere in window title string */
  9503. æC 
  9504.  
  9505. æKY kHMStringItem
  9506. æFc Balloons.h
  9507. æT 
  9508. æD     kHMStringItem = 1, /* pstring used in resource */
  9509. æC 
  9510.  
  9511. æKY kHMPictItem
  9512. æFc Balloons.h
  9513. æT 
  9514. æD     kHMPictItem = 2, /* 'PICT' ResID used in resource */
  9515. æC 
  9516.  
  9517. æKY kHMStringResItem
  9518. æFc Balloons.h
  9519. æT 
  9520. æD     kHMStringResItem = 3, /* 'STR#' ResID & index used in resource */
  9521. æC 
  9522.  
  9523. æKY kHMTEResItem
  9524. æFc Balloons.h
  9525. æT 
  9526. æD     kHMTEResItem = 6, /* Styled Text Edit ResID used in resource ('TEXT' & 'styl') */
  9527. æC 
  9528.  
  9529. æKY kHMSTRResItem
  9530. æFc Balloons.h
  9531. æT 
  9532. æD     kHMSTRResItem = 7, /* 'STR ' ResID used in resource */
  9533. æC 
  9534.  
  9535. æKY kHMSkipItem
  9536. æFc Balloons.h
  9537. æT 
  9538. æD     kHMSkipItem = 256, /* don't display a balloon */
  9539. æC 
  9540.  
  9541. æKY kHMCompareItem
  9542. æFc Balloons.h
  9543. æT 
  9544. æD     kHMCompareItem = 512, /* Compare pstring in menu item w/ PString in resource item */
  9545. æC 
  9546.  
  9547. æKY kHMNamedResourceItem
  9548. æFc Balloons.h
  9549. æT 
  9550. æD     kHMNamedResourceItem = 1024, /* Use pstring in menu item to get 'STR#', 'PICT', or 'STR ' resource ('hmnu' only) */
  9551. æC 
  9552.  
  9553. æKY kHMTrackCntlItem
  9554. æFc Balloons.h
  9555. æT 
  9556. æD     kHMTrackCntlItem = 2048, /* Reserved */
  9557. æC 
  9558.  
  9559. æKY khmmString
  9560. æFc Balloons.h
  9561. æT 
  9562. æD     khmmString = 1, /* help message contains a PString */
  9563. æC 
  9564.  
  9565. æKY khmmPict
  9566. æFc Balloons.h
  9567. æT 
  9568. æD     khmmPict = 2, /* help message contains a resource ID to a 'PICT' resource */
  9569. æC 
  9570.  
  9571. æKY khmmStringRes
  9572. æFc Balloons.h
  9573. æT 
  9574. æD     khmmStringRes = 3, /* help message contains a res ID & index to a 'STR#' resource */
  9575. æC 
  9576.  
  9577. æKY khmmTEHandle
  9578. æFc Balloons.h
  9579. æT 
  9580. æD     khmmTEHandle = 4, /* help message contains a Text Edit handle */
  9581. æC 
  9582.  
  9583. æKY khmmPictHandle
  9584. æFc Balloons.h
  9585. æT 
  9586. æD     khmmPictHandle = 5, /* help message contains a Picture handle */
  9587. æC 
  9588.  
  9589. æKY khmmTERes
  9590. æFc Balloons.h
  9591. æT 
  9592. æD     khmmTERes = 6, /* help message contains a res ID to 'TEXT' & 'styl' resources */
  9593. æC 
  9594.  
  9595. æKY khmmSTRRes
  9596. æFc Balloons.h
  9597. æT 
  9598. æD     khmmSTRRes = 7, /* help message contains a res ID to a 'STR ' resource */
  9599. æC 
  9600.  
  9601. æKY kHMTETextResType
  9602. æFc Balloons.h
  9603. æT #define
  9604. æD #define kHMTETextResType 'TEXT' /* Resource Type of text data for styled TE record w/o style info */
  9605. æC 
  9606.  
  9607. æKY kHMTEStyleResType
  9608. æFc Balloons.h
  9609. æT #define
  9610. æD #define kHMTEStyleResType 'styl' /* Resource Type of style information for styled TE record */
  9611. æC 
  9612.  
  9613. æKY kHMEnabledItem
  9614. æFc Balloons.h
  9615. æT 
  9616. æD     kHMEnabledItem = 0, /* item is enabled, but not checked or control value = 0 */
  9617. æC 
  9618.  
  9619. æKY kHMDisabledItem
  9620. æFc Balloons.h
  9621. æT 
  9622. æD     kHMDisabledItem = 1, /* item is disabled, grayed in menus or disabled in dialogs */
  9623. æC 
  9624.  
  9625. æKY kHMCheckedItem
  9626. æFc Balloons.h
  9627. æT 
  9628. æD     kHMCheckedItem = 2, /* item is enabled, and checked or control value = 1 */
  9629. æC 
  9630.  
  9631. æKY kHMOtherItem
  9632. æFc Balloons.h
  9633. æT 
  9634. æD     kHMOtherItem = 3, /* item is enabled, and control value > 1 */
  9635. æC 
  9636.  
  9637. æKY kHMMenuResType
  9638. æFc Balloons.h
  9639. æT #define
  9640. æD #define kHMMenuResType 'hmnu' /* ResType of help resource for supporting menus */
  9641. æC 
  9642.  
  9643. æKY kHMDialogResType
  9644. æFc Balloons.h
  9645. æT #define
  9646. æD #define kHMDialogResType 'hdlg' /* ResType of help resource for supporting dialogs */
  9647. æC 
  9648.  
  9649. æKY kHMWindListResType
  9650. æFc Balloons.h
  9651. æT #define
  9652. æD #define kHMWindListResType 'hwin' /* ResType of help resource for supporting windows */
  9653. æC 
  9654.  
  9655. æKY kHMRectListResType
  9656. æFc Balloons.h
  9657. æT #define
  9658. æD #define kHMRectListResType 'hrct' /* ResType of help resource for rectangles in windows */
  9659. æC 
  9660.  
  9661. æKY kHMOverrideResType
  9662. æFc Balloons.h
  9663. æT #define
  9664. æD #define kHMOverrideResType 'hovr' /* ResType of help resource for overriding system balloons */
  9665. æC 
  9666.  
  9667. æKY kHMFinderApplResType
  9668. æFc Balloons.h
  9669. æT #define
  9670. æD #define kHMFinderApplResType 'hfdr' /* ResType of help resource for custom balloon in Finder */
  9671. æC 
  9672.  
  9673. æKY kHMRegularWindow
  9674. æFc Balloons.h
  9675. æT 
  9676. æD     kHMRegularWindow = 0, /* Create a regular window floating above all windows */
  9677. æC 
  9678.  
  9679. æKY kHMSaveBitsNoWindow
  9680. æFc Balloons.h
  9681. æT 
  9682. æD     kHMSaveBitsNoWindow = 1, /* Just save the bits and draw (for MDEF calls) */
  9683. æC 
  9684.  
  9685. æKY kHMSaveBitsWindow
  9686. æFc Balloons.h
  9687. æT 
  9688. æD     kHMSaveBitsWindow = 2, /* Regular window, save bits behind, AND generate update event */
  9689. æC 
  9690.  
  9691. æKY HMStringResType
  9692. æFc Balloons.h
  9693. æT struct
  9694. æD struct HMStringResType {
  9695.     short hmmResID;
  9696.     short hmmIndex;
  9697. };
  9698.  
  9699. typedef struct HMStringResType HMStringResType;
  9700. æC 
  9701.  
  9702. æKY HMMessageRecord
  9703. HMMessageRecPtr
  9704. æFc Balloons.h
  9705. æT struct
  9706. æD struct HMMessageRecord {
  9707.         short        hmmHelpType;
  9708.         union {
  9709.                 char                hmmString[256];
  9710.                 short                hmmPict;
  9711.                 Handle                hmmTEHandle;
  9712.                 HMStringResType        hmmStringRes;
  9713.                 short                hmmPictRes;
  9714.                 Handle                hmmPictHandle;
  9715.                 short                hmmTERes;
  9716.                 short                hmmSTRRes;
  9717.             } u;
  9718. };
  9719.  
  9720. typedef struct HMMessageRecord HMMessageRecord;
  9721. typedef HMMessageRecord *HMMessageRecPtr;
  9722. æC 
  9723.  
  9724. æKY HMGetHelpMenuHandle
  9725. æFc Balloons.h
  9726. æT Function
  9727. æD pascal OSErr HMGetHelpMenuHandle(MenuHandle *mh)
  9728.     = {0x303C,0x0200,_Pack14}; 
  9729. æDT OSErr myVariable = HMGetHelpMenuHandle((MenuHandle *) mh);
  9730. æC 
  9731.  
  9732. æKY HMShowBalloon
  9733. æFc Balloons.h
  9734. æT Function
  9735. æD pascal OSErr HMShowBalloon(const HMMessageRecord *aHelpMsg,
  9736.                            Point tip,
  9737.                            RectPtr alternateRect,
  9738.                            Ptr tipProc,
  9739.                            short theProc,
  9740.                            short variant,
  9741.                            short method)
  9742.     = {0x303C,0x0B01,_Pack14}; 
  9743. æDT OSErr myVariable = HMShowBalloon((const HMMessageRecord *) aHelpMsg,()
  9744.                            Point tip,()
  9745.                            RectPtr alternateRect,()
  9746.                            Ptr tipProc,()
  9747.                            short theProc,()
  9748.                            short variant,()
  9749.                            short method);
  9750. æC 
  9751.  
  9752. æKY HMRemoveBalloon
  9753. æFc Balloons.h
  9754. æT Function
  9755. æD pascal OSErr HMRemoveBalloon(void)
  9756.     = {0x303C,0x0002,_Pack14}; 
  9757. æDT OSErr myVariable = HMRemoveBalloon()(void);
  9758. æC 
  9759.  
  9760. æKY HMGetBalloons
  9761. æFc Balloons.h
  9762. æT Function
  9763. æD pascal Boolean HMGetBalloons(void)
  9764.     = {0x303C,0x0003,_Pack14}; 
  9765. æDT Boolean myVariable = HMGetBalloons()(void);
  9766. æC 
  9767.  
  9768. æKY HMSetBalloons
  9769. æFc Balloons.h
  9770. æT Function
  9771. æD pascal OSErr HMSetBalloons(Boolean flag)
  9772.     = {0x303C,0x0104,_Pack14}; 
  9773. æDT OSErr myVariable = HMSetBalloons((Boolean) flag);
  9774. æC 
  9775.  
  9776. æKY HMShowMenuBalloon
  9777. æFc Balloons.h
  9778. æT Function
  9779. æD pascal OSErr HMShowMenuBalloon(short itemNum,
  9780.                                short itemMenuID,
  9781.                                long itemFlags,
  9782.                                long itemReserved,
  9783.                                Point tip,
  9784.                                RectPtr alternateRect,
  9785.                                Ptr tipProc,
  9786.                                short theProc,
  9787.                                short variant)
  9788.     = {0x303C,0x0E05,_Pack14}; 
  9789. æDT OSErr myVariable = HMShowMenuBalloon((short) itemNum,()
  9790.                                short itemMenuID,()
  9791.                                long itemFlags,()
  9792.                                long itemReserved,()
  9793.                                Point tip,()
  9794.                                RectPtr alternateRect,()
  9795.                                Ptr tipProc,()
  9796.                                short theProc,()
  9797.                                short variant);
  9798. æC 
  9799.  
  9800. æKY HMGetIndHelpMsg
  9801. æFc Balloons.h
  9802. æT Function
  9803. æD pascal OSErr HMGetIndHelpMsg(ResType whichType,
  9804.                              short whichResID,
  9805.                              short whichMsg,
  9806.                              short whichState,
  9807.                              long *options,
  9808.                              Point *tip,
  9809.                              Rect *altRect,
  9810.                              short *theProc,
  9811.                              short *variant,
  9812.                              HMMessageRecord *aHelpMsg,
  9813.                              short *count)
  9814.     = {0x303C,0x1306,_Pack14}; 
  9815. æDT OSErr myVariable = HMGetIndHelpMsg((ResType) whichType,()
  9816.                              short whichResID,()
  9817.                              short whichMsg,()
  9818.                              short whichState,(
  9819.                              long) * options,(
  9820.                              Point) * tip,(
  9821.                              Rect) * altRect,(
  9822.                              short) * theProc,(
  9823.                              short) * variant,(
  9824.                              HMMessageRecord) * aHelpMsg,(
  9825.                              short) * count);
  9826. æC 
  9827.  
  9828. æKY HMIsBalloon
  9829. æFc Balloons.h
  9830. æT Function
  9831. æD pascal Boolean HMIsBalloon(void)
  9832.     = {0x303C,0x0007,_Pack14}; 
  9833. æDT Boolean myVariable = HMIsBalloon()(void);
  9834. æC 
  9835.  
  9836. æKY HMSetFont
  9837. æFc Balloons.h
  9838. æT Function
  9839. æD pascal OSErr HMSetFont(short font)
  9840.     = {0x303C,0x0108,_Pack14}; 
  9841. æDT OSErr myVariable = HMSetFont((short) font);
  9842. æC 
  9843.  
  9844. æKY HMSetFontSize
  9845. æFc Balloons.h
  9846. æT Function
  9847. æD pascal OSErr HMSetFontSize(short fontSize)
  9848.     = {0x303C,0x0109,_Pack14}; 
  9849. æDT OSErr myVariable = HMSetFontSize((short) fontSize);
  9850. æC 
  9851.  
  9852. æKY HMGetFont
  9853. æFc Balloons.h
  9854. æT Function
  9855. æD pascal OSErr HMGetFont(short *font)
  9856.     = {0x303C,0x020A,_Pack14}; 
  9857. æDT OSErr myVariable = HMGetFont((short *) font);
  9858. æC 
  9859.  
  9860. æKY HMGetFontSize
  9861. æFc Balloons.h
  9862. æT Function
  9863. æD pascal OSErr HMGetFontSize(short *fontSize)
  9864.     = {0x303C,0x020B,_Pack14}; 
  9865. æDT OSErr myVariable = HMGetFontSize((short *) fontSize);
  9866. æC 
  9867.  
  9868. æKY HMSetDialogResID
  9869. æFc Balloons.h
  9870. æT Function
  9871. æD pascal OSErr HMSetDialogResID(short resID)
  9872.     = {0x303C,0x010C,_Pack14}; 
  9873. æDT OSErr myVariable = HMSetDialogResID((short) resID);
  9874. æC 
  9875.  
  9876. æKY HMSetMenuResID
  9877. æFc Balloons.h
  9878. æT Function
  9879. æD pascal OSErr HMSetMenuResID(short menuID,
  9880.                             short resID)
  9881.     = {0x303C,0x020D,_Pack14}; 
  9882. æDT OSErr myVariable = HMSetMenuResID((short) menuID,()
  9883.                             short resID);
  9884. æC 
  9885.  
  9886. æKY HMBalloonRect
  9887. æFc Balloons.h
  9888. æT Function
  9889. æD pascal OSErr HMBalloonRect(const HMMessageRecord *aHelpMsg,
  9890.                            Rect *coolRect)
  9891.     = {0x303C,0x040E,_Pack14}; 
  9892. æDT OSErr myVariable = HMBalloonRect((const HMMessageRecord *) aHelpMsg,(
  9893.                            Rect) * coolRect);
  9894. æC 
  9895.  
  9896. æKY HMBalloonPict
  9897. æFc Balloons.h
  9898. æT Function
  9899. æD pascal OSErr HMBalloonPict(const HMMessageRecord *aHelpMsg,
  9900.                            PicHandle *coolPict)
  9901.     = {0x303C,0x040F,_Pack14}; 
  9902. æDT OSErr myVariable = HMBalloonPict((const HMMessageRecord *) aHelpMsg,(
  9903.                            PicHandle) * coolPict);
  9904. æC 
  9905.  
  9906. æKY HMScanTemplateItems
  9907. æFc Balloons.h
  9908. æT Function
  9909. æD pascal OSErr HMScanTemplateItems(short whichID,
  9910.                                  short whichResFile,
  9911.                                  ResType whichType)
  9912.     = {0x303C,0x0410,_Pack14}; 
  9913. æDT OSErr myVariable = HMScanTemplateItems((short) whichID,()
  9914.                                  short whichResFile,()
  9915.                                  ResType whichType);
  9916. æC 
  9917.  
  9918. æKY HMExtractHelpMsg
  9919. æFc Balloons.h
  9920. æT Function
  9921. æD pascal OSErr HMExtractHelpMsg(ResType whichType,short whichResID,short whichMsg,
  9922.     short whichState,HMMessageRecord *aHelpMsg)
  9923.     = {0x303C,0x0711,_Pack14}; 
  9924. æDT OSErr myVariable = HMExtractHelpMsg((ResType) whichType,(short) whichResID,(short) whichMsg,()
  9925.     short whichState,(HMMessageRecord *) aHelpMsg);
  9926. æC 
  9927.  
  9928. æKY HMGetDialogResID
  9929. æFc Balloons.h
  9930. æT Function
  9931. æD pascal OSErr HMGetDialogResID(short *resID)
  9932.     = {0x303C,0x0213,_Pack14}; 
  9933. æDT OSErr myVariable = HMGetDialogResID((short *) resID);
  9934. æC 
  9935.  
  9936. æKY HMGetMenuResID
  9937. æFc Balloons.h
  9938. æT Function
  9939. æD pascal OSErr HMGetMenuResID(short menuID,short *resID)
  9940.     = {0x303C,0x0314,_Pack14}; 
  9941. æDT OSErr myVariable = HMGetMenuResID((short) menuID,(short *) resID);
  9942. æC 
  9943.  
  9944. æKY HMGetBalloonWindow
  9945. æFc Balloons.h
  9946. æT Function
  9947. æD pascal OSErr HMGetBalloonWindow(WindowPtr *window)
  9948.     = {0x303C,0x0215,_Pack14}; 
  9949. æDT OSErr myVariable = HMGetBalloonWindow((WindowPtr *) window);
  9950. æC 
  9951.  
  9952.  
  9953. æKY Controls.h
  9954. æKL DisposeControl
  9955. dragcontrol
  9956. DragControl
  9957. Draw1Control
  9958. DrawControls
  9959. findcontrol
  9960. FindControl
  9961. GetAuxCtl
  9962. GetCRefCon
  9963. GetCTitle
  9964. getctitle
  9965. GetCtlAction
  9966. GetCtlMax
  9967. GetCtlMin
  9968. GetCtlValue
  9969. GetCVariant
  9970. GetNewControl
  9971. HideControl
  9972. HiliteControl
  9973. KillControls
  9974. MoveControl
  9975. newcontrol
  9976. NewControl
  9977. SetCRefCon
  9978. SetCTitle
  9979. setctitle
  9980. SetCtlAction
  9981. SetCtlColor
  9982. SetCtlMax
  9983. SetCtlMin
  9984. SetCtlValue
  9985. ShowControl
  9986. SizeControl
  9987. testcontrol
  9988. TestControl
  9989. TrackControl
  9990. trackcontrol
  9991. UpdateControls
  9992. UpdtControl
  9993.  
  9994. autoTrack
  9995. AuxCtlHandle
  9996. AuxCtlPtr
  9997. AuxCtlRec
  9998. calcCntlRgn
  9999. calcCRgns
  10000. calcThumbRgn
  10001. cBodyColor
  10002. CCTabHandle
  10003. CCTabPtr
  10004. cFrameColor
  10005. checkBoxProc
  10006. ControlHandle
  10007. ControlPtr
  10008. ControlRecord
  10009. cTextColor
  10010. cThumbColor
  10011. CtlCTab
  10012. dispCntl
  10013. dragCntl
  10014. drawCntl
  10015. hAxisOnly
  10016. inButton
  10017. inCheckBox
  10018. inDownButton
  10019. initCntl
  10020. inLabel
  10021. inMenu
  10022. inPageDown
  10023. inPageUp
  10024. inThumb
  10025. inTriangle
  10026. inUpButton
  10027. noConstraint
  10028. popupMenuProc
  10029. popupTitleCenterJust
  10030. popupTitleLeftJust
  10031. popupTitleRightJust
  10032. posCntl
  10033. pushButProc
  10034. radioButProc
  10035. scrollBarProc
  10036. testCntl
  10037. thumbCntl
  10038. useWFont
  10039. vAxisOnly
  10040.  
  10041. æKY pushButProc
  10042. æFc Controls.h
  10043. æT 
  10044. æD     pushButProc = 0,
  10045. æC 
  10046.  
  10047. æKY checkBoxProc
  10048. æFc Controls.h
  10049. æT 
  10050. æD     checkBoxProc = 1,
  10051. æC 
  10052.  
  10053. æKY radioButProc
  10054. æFc Controls.h
  10055. æT 
  10056. æD     radioButProc = 2,
  10057. æC 
  10058.  
  10059. æKY useWFont
  10060. æFc Controls.h
  10061. æT 
  10062. æD     useWFont = 8,
  10063. æC 
  10064.  
  10065. æKY scrollBarProc
  10066. æFc Controls.h
  10067. æT 
  10068. æD     scrollBarProc = 16,
  10069. æC 
  10070.  
  10071. æKY inButton
  10072. æFc Controls.h
  10073. æT 
  10074. æD     inButton = 10,
  10075. æC 
  10076.  
  10077. æKY inCheckBox
  10078. æFc Controls.h
  10079. æT 
  10080. æD     inCheckBox = 11,
  10081. æC 
  10082.  
  10083. æKY inUpButton
  10084. æFc Controls.h
  10085. æT 
  10086. æD     inUpButton = 20,
  10087. æC 
  10088.  
  10089. æKY inDownButton
  10090. æFc Controls.h
  10091. æT 
  10092. æD     inDownButton = 21,
  10093. æC 
  10094.  
  10095. æKY inPageUp
  10096. æFc Controls.h
  10097. æT 
  10098. æD     inPageUp = 22,
  10099. æC 
  10100.  
  10101. æKY inPageDown
  10102. æFc Controls.h
  10103. æT 
  10104. æD     inPageDown = 23,
  10105. æC 
  10106.  
  10107. æKY inThumb
  10108. æFc Controls.h
  10109. æT 
  10110. æD     inThumb = 129,
  10111. æC 
  10112.  
  10113. æKY popupMenuProc
  10114. æFc Controls.h
  10115. æT 
  10116. æD     popupMenuProc = 1008, /* 63 * 16 */
  10117. æC 
  10118.  
  10119. æKY inLabel
  10120. æFc Controls.h
  10121. æT 
  10122. æD     inLabel = 1,
  10123. æC 
  10124.  
  10125. æKY inMenu
  10126. æFc Controls.h
  10127. æT 
  10128. æD     inMenu = 2,
  10129. æC 
  10130.  
  10131. æKY inTriangle
  10132. æFc Controls.h
  10133. æT 
  10134. æD     inTriangle = 4,
  10135. æC 
  10136.  
  10137. æKY popupTitleLeftJust
  10138. æFc Controls.h
  10139. æT 
  10140. æD     popupTitleLeftJust = 0x00000000,
  10141. æC 
  10142.  
  10143. æKY popupTitleCenterJust
  10144. æFc Controls.h
  10145. æT 
  10146. æD     popupTitleCenterJust = 0x00000001,
  10147. æC 
  10148.  
  10149. æKY popupTitleRightJust
  10150. æFc Controls.h
  10151. æT 
  10152. æD     popupTitleRightJust = 0x000000FF,
  10153. æC 
  10154.  
  10155. æKY noConstraint
  10156. æFc Controls.h
  10157. æT 
  10158. æD     noConstraint = 0,
  10159. æC 
  10160.  
  10161. æKY hAxisOnly
  10162. æFc Controls.h
  10163. æT 
  10164. æD     hAxisOnly = 1,
  10165. æC 
  10166.  
  10167. æKY vAxisOnly
  10168. æFc Controls.h
  10169. æT 
  10170. æD     vAxisOnly = 2,
  10171. æC 
  10172.  
  10173. æKY drawCntl
  10174. æFc Controls.h
  10175. æT 
  10176. æD     drawCntl = 0,
  10177. æC 
  10178.  
  10179. æKY testCntl
  10180. æFc Controls.h
  10181. æT 
  10182. æD     testCntl = 1,
  10183. æC 
  10184.  
  10185. æKY calcCRgns
  10186. æFc Controls.h
  10187. æT 
  10188. æD     calcCRgns = 2,
  10189. æC 
  10190.  
  10191. æKY initCntl
  10192. æFc Controls.h
  10193. æT 
  10194. æD     initCntl = 3,
  10195. æC 
  10196.  
  10197. æKY dispCntl
  10198. æFc Controls.h
  10199. æT 
  10200. æD     dispCntl = 4,
  10201. æC 
  10202.  
  10203. æKY posCntl
  10204. æFc Controls.h
  10205. æT 
  10206. æD     posCntl = 5,
  10207. æC 
  10208.  
  10209. æKY thumbCntl
  10210. æFc Controls.h
  10211. æT 
  10212. æD     thumbCntl = 6,
  10213. æC 
  10214.  
  10215. æKY dragCntl
  10216. æFc Controls.h
  10217. æT 
  10218. æD     dragCntl = 7,
  10219. æC 
  10220.  
  10221. æKY autoTrack
  10222. æFc Controls.h
  10223. æT 
  10224. æD     autoTrack = 8,
  10225. æC 
  10226.  
  10227. æKY calcCntlRgn
  10228. æFc Controls.h
  10229. æT 
  10230. æD     calcCntlRgn = 10,
  10231. æC 
  10232.  
  10233. æKY calcThumbRgn
  10234. æFc Controls.h
  10235. æT 
  10236. æD     calcThumbRgn = 11,
  10237. æC 
  10238.  
  10239. æKY cFrameColor
  10240. æFc Controls.h
  10241. æT 
  10242. æD     cFrameColor = 0,
  10243. æC 
  10244.  
  10245. æKY cBodyColor
  10246. æFc Controls.h
  10247. æT 
  10248. æD     cBodyColor = 1,
  10249. æC 
  10250.  
  10251. æKY cTextColor
  10252. æFc Controls.h
  10253. æT 
  10254. æD     cTextColor = 2,
  10255. æC 
  10256.  
  10257. æKY cThumbColor
  10258. æFc Controls.h
  10259. æT 
  10260. æD     cThumbColor = 3,
  10261. æC 
  10262.  
  10263. æKY ControlRecord
  10264. ControlPtr
  10265. ControlHandle
  10266. æFc Controls.h
  10267. æT struct
  10268. æD struct ControlRecord {
  10269.     struct ControlRecord **nextControl;
  10270.     WindowPtr contrlOwner;
  10271.     Rect contrlRect;
  10272.     unsigned char contrlVis;
  10273.     unsigned char contrlHilite;
  10274.     short contrlValue;
  10275.     short contrlMin;
  10276.     short contrlMax;
  10277.     Handle contrlDefProc;
  10278.     Handle contrlData;
  10279.     ProcPtr contrlAction;
  10280.     long contrlRfCon;
  10281.     Str255 contrlTitle;
  10282. };
  10283.  
  10284. typedef struct ControlRecord ControlRecord;
  10285. typedef ControlRecord *ControlPtr, **ControlHandle;
  10286. æC 
  10287. Every control is represented internally by a control record containing all pertinent
  10288. information about that control. The control record contains the following:
  10289.  
  10290.   •  A pointer to the window the control belongs to.
  10291.   •  A handle to the next control in the window’s control list.
  10292.   •  A handle to the control definition function.
  10293.   •  The control’s title, if any.
  10294.   •  A rectangle that completely encloses the control, which determines
  10295.      the control’s size and location within its window. The entire control,
  10296.      including the title of a check box or radio button, is drawn inside
  10297.      this rectangle.
  10298.   •  An indication of whether the control is currently active and how it’s
  10299.      to be highlighted.
  10300.   •  The current setting of the control (if this type of control retains a
  10301.      setting) and the minimum and maximum values the setting can assume. For
  10302.      check boxes and radio buttons, a setting of 0 means the control is off
  10303.      and 1 means it’s on.
  10304.  
  10305. The control record also contains an indication of whether the control is currently
  10306. visible or invisible. These terms refer only to whether the control is drawn in its
  10307. window, not to whether you can see it on the screen. A control may be “visible” and
  10308. still not appear on the screen, because it’s obscured by overlapping windows or other
  10309. objects.
  10310.  
  10311. There’s a field in the control record for a pointer to the control’s default action
  10312. procedure. An action procedure defines some action to be performed repeatedly for as
  10313. long as the user holds down the mouse button inside the control. The default action
  10314. procedure may be used by the Control Manager function TrackControl if you call it
  10315. without passing a pointer to an action procedure; this is discussed in detail in the
  10316. description of TrackControl in the “Control Manager Routines” section.
  10317.  
  10318. Finally, the control record includes a 32-bit reference value field, which is reserved
  10319. for use by your application. You specify an initial reference value when you create a
  10320. control, and can then read or change the reference value whenever you wish.
  10321.  
  10322. The data type for a control record is called ControlRecord. A control record is
  10323. referred to by a handle:
  10324.  
  10325. TYPE  ControlPtr     = ^ControlRecord;
  10326.       ControlHandle  = ^ControlPtr;
  10327.  
  10328. The Control Manager functions for creating a control return a handle to a newly
  10329. allocated control record; thereafter, your program should normally refer to the
  10330. control by this handle. Most of the Control Manager routines expect a control handle
  10331. as their first parameter.
  10332.  
  10333. You can store into and access most of a control record’s fields with Control Manager
  10334. routines, so normally you don’t have to know the exact field names. However, if you
  10335. want more information about the exact structure of a control record—if you’re defining
  10336. your own control types, for instance—it’s given below.
  10337.  
  10338. _______________________________________________________________________________
  10339.  
  10340. »The ControlRecord Data Type
  10341.  
  10342. The ControlRecord data type is defined as follows:
  10343.  
  10344. TYPE ControlRecord =
  10345.       PACKED RECORD
  10346.         nextControl:    ControlHandle;  {next control}
  10347.         contrlOwner:    WindowPtr;      {control's window}
  10348.         contrlRect:     Rect;           {enclosing rectangle}
  10349.         contrlVis:      Byte;           {255 if visible}
  10350.         contrlHilite:   Byte;           {highlight state}
  10351.         contrlValue:    INTEGER;        {control's current setting}
  10352.         contrlMin:      INTEGER;        {control's minimum setting}
  10353.         contrlMax:      INTEGER;        {control's maximum setting}
  10354.         contrlDefProc:  Handle;         {control definition function}
  10355.         contrlData:     Handle;         {data used by contrlDefProc}
  10356.         contrlAction:   ProcPtr;        {default action procedure}
  10357.         contrlRfCon:    LONGINT;        {control's reference value}
  10358.         contrlTitle:    Str255          {control's title}
  10359.       END;
  10360.  
  10361. NextControl is a handle to the next control associated with this control’s window.
  10362. All the controls belonging to a given window are kept in a linked list, beginning in
  10363. the controlList field of the window record and chained together through the nextControl
  10364. fields of the individual control records. The end of the list is marked by a NIL
  10365. value; as new controls are created, they’re added to the beginning of the list.
  10366.  
  10367. ContrlOwner is a pointer to the window that this control belongs to.
  10368.  
  10369. ContrlRect is the rectangle that completely encloses the control, in the local coordinates
  10370. of the control’s window.
  10371.  
  10372. When contrlVis is 0, the control is currently invisible; when it’s 255, the control
  10373. is visible.
  10374.  
  10375. ContrlHilite specifies whether and how the control is to be highlighted, indicating
  10376. whether it’s active or inactive. The HiliteControl procedure lets you set this field;
  10377. see the description of HiliteControl for more information about the meaning of the
  10378. field’s value.
  10379.  
  10380. ContrlValue is the control’s current setting. For check boxes and radio buttons, 0
  10381. means the control is off and 1 means it’s on. For dials, the fields contrlMin and
  10382. contrlMax define the range of possible settings; contrlValue may take on any value
  10383. within that range. Other (custom) control types can use these three fields as they
  10384. see fit.
  10385.  
  10386. ContrlDefProc is a handle to the control definition function for this type of control.
  10387. When you create a control, you identify its type with a control definition ID, which
  10388. is converted into a handle to the control definition function and stored in the
  10389. contrlDefProc field. Thereafter, the Control Manager uses this handle to access the
  10390. definition function; you should never need to refer to this field directly.
  10391.  
  10392. Note:  When not running in 32-bit mode, the high-order byte of the
  10393.        contrlDefProc field contains some additional information that
  10394.        the Control Manager gets from the control definition ID; for
  10395.        details, see the section “Defining Your Own Controls”.
  10396.  
  10397. ContrlData is reserved for use by the control definition function, typically to hold
  10398. additional information specific to a particular control type. For example, the standard
  10399. definition function for scroll bars uses this field for a handle to the region containing
  10400. the scroll bar’s thumb. If no more than four bytes of additional information are
  10401. needed, the definition function can store the information directly in the contrlData
  10402. field rather than use a handle.
  10403.  
  10404. ContrlAction is a pointer to the control’s default action procedure, if any. The
  10405. Control Manager function TrackControl may call this procedure to respond to the
  10406. user’s dragging the mouse inside the control.
  10407.  
  10408. ContrlRfCon is the control’s reference value field, which the application may store
  10409. into and access for any purpose.
  10410.  
  10411. ContrlTitle is the control’s title, if any.
  10412.  
  10413. æKY CtlCTab
  10414. CCTabPtr
  10415. CCTabHandle
  10416. æFc Controls.h
  10417. æT struct
  10418. æD struct CtlCTab {
  10419.     long ccSeed; /*reserved*/
  10420.     short ccRider; /*see what you have done - reserved*/
  10421.     short ctSize; /*usually 3 for controls*/
  10422.     ColorSpec ctTable[4];
  10423. };
  10424.  
  10425. typedef struct CtlCTab CtlCTab;
  10426. typedef CtlCTab *CCTabPtr, **CCTabHandle;
  10427. æC 
  10428. The contents and meaning of a control’s color table are determined by its control
  10429. definition function (see “The Control Color Table Resource” section). The CTabHandle
  10430. parameter used in the Color Control Manager routines provides a handle to the control
  10431. color table. The components of a control color table are defined as follows:
  10432.  
  10433. TYPE
  10434.   CCTabHandle = ^CCTabPtr;
  10435.   CCTabPtr    = ^CtlCTab;
  10436.   CtlCTab     = RECORD
  10437.                   ccSeed:      LONGINT;    {not used for controls}
  10438.                   ccRider:     INTEGER;    {not used for controls}
  10439.                   ctSize:      INTEGER;    {number of entries in table –1}
  10440.                   ctTable:     cSpecArray  {array of ColorSpec records}
  10441.                 END;
  10442.  
  10443. Field descriptions
  10444.  
  10445. ccSeed        The ccSeed field is unused in control color tables.
  10446.  
  10447. ccRider       The ccRider field is unused in control color tables.
  10448.  
  10449. ctSize        The ctSize field defines the number of elements in the table,
  10450.               minus one. For controls drawn with the standard definition
  10451.               procedure, this field is always 3.
  10452.  
  10453. ctTable       The ctTable field holds an array of colorSpec records. Each
  10454.               colorSpec is made up of a partIdentifier field and a partRGB
  10455.               field. The partIdentifier field holds an integer which
  10456.               associates an RGBColor to a particular part of the control.
  10457.               The definition procedures attempt to find the appropriate part
  10458.               identifier when preparing to draw a part. If that part
  10459.               identifier is not found, the first color in the table is
  10460.               used to draw the part. The part identifiers can appear in any
  10461.               order in the table. The partRGB field specifies a standard RGB
  10462.               color record, indicating what absolute color will be used to
  10463.               draw the control part found in the partIdentifier field.
  10464.  
  10465. A standard control color table is shown in Figure 6.
  10466.  
  10467. •••Refer to Figure 6.•••
  10468.  
  10469. Figure 6–Control Color Table
  10470.  
  10471. The 'cctb' resource is an exact image of this control table data structure, and is
  10472. stored in the same format as 'clut' color table resources.
  10473.  
  10474. Standard buttons, check boxes, and radio buttons use a four-element color table with
  10475. part identifiers as shown below:
  10476.  
  10477.   cFrameColor (0)       Frame color
  10478.   cBodyColor (1)        Fill color for body of control
  10479.   cTextColor (2)        Text color
  10480.   cThumbColor (3)       Unused
  10481.  
  10482. When highlighted, plain buttons exchange their body and text colors (colors 1 and 2);
  10483. check boxes and radio buttons change their appearance without changing colors.  All
  10484. three types indicate deactivation by dimming their text with no change in colors.
  10485.  
  10486. Standard scroll bars use a four-element color table with part identifiers as shown
  10487. below:
  10488.  
  10489.   cFrameColor (0)       Frame color, foreground color for shaft and arrows
  10490.   cBodyColor (1         Background color for shaft and arrows
  10491.   cTextColor (2)        Unused
  10492.   cThumbColor (3)       Fill color for thumb
  10493.  
  10494. When highlighted, the arrows are filled with the foreground color (color 0) within
  10495. the arrow outline. A deactivated scroll bar shows no indicator, and displays its
  10496. shaft in solid background color (color 1), with no pattern.
  10497.  
  10498. The 'cctb' resource = 0 is read into the application heap when the application starts,
  10499. and serves as the default control color table. The last record in the auxiliary
  10500. control list points to the default 'cctb' resource. When drawing a control, the
  10501. standard control definition function searches the list for an auxiliary control
  10502. record whose acOwner points to the control being drawn.  If it finds such a record,
  10503. it uses the color table designated by that record; if it doesn’t find one before
  10504. reaching the default record at the end of the list, it uses the default color table
  10505. instead. All types of controls share the same default record. The default auxiliary
  10506. control record is recognized by NIL values in both its acNext and acOwner fields; the
  10507. application must not change these fields.
  10508.  
  10509. A nonstandard control definition function can use color tables of any desired size
  10510. and define their contents in any way it wishes, except that part indices 1 to 127 are
  10511. reserved for system definition.  Any such nonstandard function should take care to
  10512. bypass the defaulting mechanism just described, by allocating an explicit auxiliary
  10513. record for every control it creates.
  10514.  
  10515. æKY AuxCtlRec
  10516. AuxCtlPtr
  10517. AuxCtlHandle
  10518. æFc Controls.h
  10519. æT struct
  10520. æD struct AuxCtlRec {
  10521.     Handle acNext; /*handle to next AuxCtlRec*/
  10522.     ControlHandle acOwner; /*handle for aux record's control*/
  10523.     CCTabHandle acCTable; /*color table for this control*/
  10524.     short acFlags; /*misc flag byte*/
  10525.     long acReserved; /*reserved for use by Apple*/
  10526.     long acRefCon; /*for use by application*/
  10527. };
  10528.  
  10529. typedef struct AuxCtlRec AuxCtlRec;
  10530. typedef AuxCtlRec *AuxCtlPtr, **AuxCtlHandle;
  10531. æC 
  10532. The information needed for drawing controls in color is kept in a linked list of
  10533. auxiliary control records, beginning in the global variable AuxCtlHead.
  10534. (Notice that there is just one global list for all controls in all windows, not a
  10535. separate one for each window.) Each window record has a handle to the list of controls.
  10536. Figure 5 shows the auxiliary control list structure.
  10537.  
  10538. •••Refer to Figure 5.•••
  10539.  
  10540. Figure 5–Auxiliary Control List
  10541.  
  10542. Each auxiliary control record is a relocatable object residing in the application
  10543. heap. The most important information it holds is a handle to the control’s individual
  10544. color table (see the “Control Color Tables” section).  The rest of the record consists
  10545. of a link to the next record in the list, a field that identifies the control’s
  10546. owner, a 4-byte field reserved for future expansion, and a 4-byte reference constant
  10547. for use by the application:
  10548.  
  10549. TYPE
  10550.   AuxCtlHandle = ^AuxCtlPtr;
  10551.   AuxCtlPtr    = ^AuxCtlRec;
  10552.   AuxCtlRec    = RECORD
  10553.                    acNext:      AuxCtlHandle;   {handle to next record in list}
  10554.                    acOwner:     ControlHandle;  {handle to owning control}
  10555.                    acCTable:    CCTabHandle;    {handle to control's color }
  10556.                                                 { table}
  10557.                    acFlags:     INTEGER;        {miscellaneous flags; reserved}
  10558.                    acReserved:  LONGINT;        {reserved for future expansion}
  10559.                    acRefCon:    LONGINT         {reserved for application use}
  10560.                  END;
  10561.  
  10562. Field descriptions
  10563.  
  10564. acNext        The acNext field contains a handle to the next record in
  10565.               the auxiliary control list.
  10566.  
  10567. acOwner       The acOwner field contains the handle of the control to
  10568.               which this auxiliary record belongs. Used as an ID field.
  10569.  
  10570. acCTable      The acCTable contains the handle to the control’s color
  10571.               table (see “Control Color Tables” below).
  10572.  
  10573. acFlags       The acFlags field contains miscellaneous flags for use by
  10574.               the Control Manager; this field is reserved.
  10575.  
  10576. acReserved    The acReserved field is reserved for future expansion;
  10577.               this must be set to 0 for future compatibility.
  10578.  
  10579. acRefCon      The acRefCon field is a reference constant for use by
  10580.               the application.
  10581.  
  10582. Not every control needs an auxiliary control record.  When an application is started,
  10583. a resource containing a default color table is loaded from the system resource file;
  10584. this resource defines a standard set of control colors. Since there is no InitControls
  10585. routine, this happens when an application calls InitWindows.
  10586.  
  10587. Separate auxiliary control records are needed only for controls whose color usage
  10588. differs from the default.  Each such nonstandard control must have its own auxiliary
  10589. record, even if it uses the same colors as another control. This allows two or more
  10590. auxiliary records to share the same control color table. If the control color table
  10591. is a resource, it won’t be deleted by DisposeControl. When using an auxiliary record
  10592. that is not stored as a resource, the application should not deallocate the color
  10593. table if another control is still using it.
  10594.  
  10595. A control created from scratch will initially have no auxiliary control record.  If
  10596. it is to use nonstandard colors, it must be given an auxiliary record and a color
  10597. table with SetCtlColor (see the “Control Manager Routines” section).  Such a control
  10598. should normally be made invisible at creation and then displayed with ShowControl
  10599. after the colors are set.  For controls created from a 'CNTL' resource,  the color
  10600. table can be specified as a resource as well. See the section titled “The Control
  10601. Color Table Resource”.
  10602.  
  10603. A/UX systems:  When using 32-bit mode. every control has its own auxiliary
  10604.                record. If there is no specific set of control colors for
  10605.                this control, the acCTable will point to the default color table.
  10606.  
  10607. æKY NewControl
  10608. æFc Controls.h
  10609. æT Function
  10610. æTN A954
  10611. æD pascal ControlHandle NewControl(WindowPtr theWindow,const Rect *boundsRect,
  10612.     ConstStr255Param title,Boolean visible,short value,short min,short max,
  10613.     short procID,long refCon)
  10614.     = 0xA954; 
  10615. æDT ControlHandle myVariable = NewControl((WindowPtr) theWindow,(const Rect *) boundsRect,()
  10616.     ConstStr255Param title,(Boolean) visible,(short) value,(short) min,(short) max,()
  10617.     short procID,(long) refCon);
  10618. æMM
  10619. æRI I-319, P-112, 114, 177
  10620. æC  
  10621. NewControl creates a control, adds it to the beginning of theWindow’s control list,
  10622. and returns a handle to the new control. The values passed as parameters are stored
  10623. in the corresponding fields of the control record, as described below. The field that
  10624. determines highlighting is set to 0 (no highlighting) and the pointer to the default
  10625. action procedure is set to NIL (none).
  10626.  
  10627. Note:  The control definition function may do additional initialization,
  10628.        including changing any of the fields of the control record. The only
  10629.        standard control for which additional initialization is done is the
  10630.        scroll bar; its control definition function allocates space for a
  10631.        region to hold the thumb and stores the region handle in the
  10632.        contrlData field of the control record.
  10633.  
  10634. TheWindow is the window the new control will belong to. All coordinates pertaining to
  10635. the control will be interpreted in this window’s local coordinate system.
  10636.  
  10637. BoundsRect, given in theWindow’s local coordinates, is the rectangle that encloses
  10638. the control and thus determines its size and location. Note the following about the
  10639. enclosing rectangle for the standard controls:
  10640.  
  10641.   •  Simple buttons are drawn to fit the rectangle exactly. (The control
  10642.      definition function calls the QuickDraw procedure FrameRoundRect.) To
  10643.      allow for the tallest characters in the system font, there should be
  10644.      at least a 20-point difference between the top and bottom coordinates
  10645.      of the rectangle.
  10646.   •  For check boxes and radio buttons, there should be at least a 16-point
  10647.      difference between the top and bottom coordinates.
  10648.   •  By convention, scroll bars are 16 pixels wide, so there should be a
  10649.      16-point difference between the left and right (or top and bottom)
  10650.      coordinates. (If there isn’t, the scroll bar will be scaled to fit
  10651.      the rectangle.) A standard scroll bar should be at least 48 pixels
  10652.      long, to allow room for the scroll arrows and thumb.
  10653.  
  10654. Title is the control’s title, if any (if none, you can just pass the empty string as
  10655. the title). Be sure the title will fit in the control’s enclosing rectangle; if it
  10656. won’t it will be truncated on the right for check boxes and radio buttons, or centered
  10657. and truncated on both ends for simple buttons.
  10658.  
  10659. Note:  Some non-Roman systems write text from right-to-left, in which
  10660.        case radio buttons and check boxes are drawn with their titles
  10661.        on the left of the control.  They are also truncated on the left.
  10662.        See the Script Manager chapter for more information.
  10663.  
  10664. If the visible parameter is TRUE, NewControl draws the control.
  10665.  
  10666. Note:  It does not use the standard window updating mechanism, but
  10667.        instead draws the control immediately in the window.
  10668.  
  10669. The min and max parameters define the control’s range of possible settings; the value
  10670. parameter gives the initial setting. For controls that don’t retain a setting, such
  10671. as buttons, the values you supply for these parameters will be stored in the control
  10672. record but will never be used. So it doesn’t matter what values you give for those
  10673. controls—0 for all three parameters will do. For controls that just retain an on-or-off
  10674. setting, such as check boxes or radio buttons, min should be 0 (meaning the control
  10675. is off) and max should be 1
  10676. (meaning it’s on). For dials, you can specify whatever values are appropriate for
  10677. min, max, and value.
  10678.  
  10679. ProcID is the control definition ID, which leads to the control definition function
  10680. for this type of control. (The function is read into memory if it
  10681. isn’t already in memory.) The control definition IDs for the standard control types
  10682. are listed above under “Controls and Resources”. Control definition IDs for custom
  10683. control types are discussed later under “Defining Your Own Controls”.
  10684.  
  10685. RefCon is the control’s reference value, set and used only by your application.
  10686.  
  10687. æKY SetCTitle
  10688. æFc Controls.h
  10689. æT Function
  10690. æTN A95F
  10691. æD pascal void SetCTitle(ControlHandle theControl,ConstStr255Param title)
  10692.     = 0xA95F; 
  10693. æDT SetCTitle((ControlHandle) theControl,(ConstStr255Param) title);
  10694. æMM
  10695. æRI I-321
  10696. æC  
  10697. SetCTitle sets theControl’s title to the given string and redraws the control.
  10698.  
  10699. æKY GetCTitle
  10700. æFc Controls.h
  10701. æT Function
  10702. æTN A95E
  10703. æD pascal void GetCTitle(ControlHandle theControl,Str255 title)
  10704.     = 0xA95E; 
  10705. æDT GetCTitle((ControlHandle) theControl,(Str255) title);
  10706. æRI I-321
  10707. æC 
  10708. GetCTitle returns theControl’s title as the value of the title parameter.
  10709.  
  10710. æKY GetNewControl
  10711. æFc Controls.h
  10712. æT Function
  10713. æTN A9BE
  10714. æD pascal ControlHandle GetNewControl(short controlID,WindowPtr owner)
  10715.     = 0xA9BE; 
  10716. æDT ControlHandle myVariable = GetNewControl((short) controlID,(WindowPtr) owner);
  10717. æMM
  10718. æRT 203
  10719. æRI I-321, P-112, 113, 114, 172
  10720. æC 
  10721. GetNewControl creates a control from a control template stored in a resource file,
  10722. adds it to the beginning of theWindow’s control list, and returns a handle to the new
  10723. control. ControlID is the resource ID of the template. GetNewControl works exactly
  10724. the same as NewControl (above), except that it gets the initial values for the new
  10725. control’s fields from the specified control template instead of accepting them as
  10726. parameters. If the control template can’t be read from the resource file, GetNewControl
  10727. returns NIL. It releases the memory occupied by the resource before returning.
  10728.  
  10729. The system default control colors are stored in the System file and ROMResources as
  10730. 'cctb' resource = 0. By including a 'cctb' resource = 0 in your application, it is
  10731. possible to change the default colors that will be used for all controls, unless a
  10732. specific 'cctb' exists for a control defined within the application.
  10733.  
  10734. When you use GetNewControl for the control resource 'CNTL', GetNewControl will attempt
  10735. to load a 'cctb' resource with the same ID as the 'CNTL' resource ID, if one is
  10736. present. It then executes the SetCtlColor call.
  10737.  
  10738. The following part identifiers for control elements should be present in the ColorSpec.value
  10739. field:
  10740.  
  10741.   cFrameColor (0)       Frame color
  10742.   cBodyColor (1)        Fill color for body of control
  10743.   cTextColor (2)        Text color
  10744.   cThumbColor (3)       Thumb color
  10745.  
  10746. These identifiers may be present in any order; for instance, the text or indicator
  10747. color values may be stored before the fill and frame colors in the ColorSpec record
  10748. structure. If a part identifier is not found, then the first color in the color table
  10749. will be used.
  10750.  
  10751. æKY DisposeControl
  10752. æFc Controls.h
  10753. æT Function
  10754. æTN A955
  10755. æD pascal void DisposeControl(ControlHandle theControl)
  10756.     = 0xA955; 
  10757. æDT DisposeControl((ControlHandle) theControl);
  10758. æMM
  10759. æRI I-321, P-168
  10760. æC 
  10761. Assembly-language note:  The macro you invoke to call DisposeControl from
  10762.                          assembly language is named _DisposControl.
  10763.  
  10764. DisposeControl removes theControl from the screen, deletes it from its window’s
  10765. control list, and releases the memory occupied by the control record and any data
  10766. structures associated with the control.
  10767.  
  10768. æKY KillControls
  10769. æFc Controls.h
  10770. æT Function
  10771. æTN A956
  10772. æD pascal void KillControls(WindowPtr theWindow)
  10773.     = 0xA956; 
  10774. æDT KillControls((WindowPtr) theWindow);
  10775. æMM
  10776. æRI I-321, P-113, 175
  10777. æC 
  10778. KillControls disposes of all controls associated with theWindow by calling DisposeControl
  10779. (above) for each.
  10780.  
  10781. Note:  Remember that the Window Manager procedures CloseWindow and
  10782.        DisposeWindow automatically dispose of all controls associated
  10783.        with the given window.
  10784.  
  10785. æKY HideControl
  10786. æFc Controls.h
  10787. æT Function
  10788. æTN A958
  10789. æD pascal void HideControl(ControlHandle theControl)
  10790.     = 0xA958; 
  10791. æDT HideControl((ControlHandle) theControl);
  10792. æMM
  10793. æRI I-322, P-113, 114, 174
  10794. æC 
  10795. HideControl makes theControl invisible. It fills the region the control occupies
  10796. within its window with the background pattern of the window’s grafPort. It also adds
  10797. the control’s enclosing rectangle to the window’s update region, so that anything
  10798. else that was previously obscured by the control will reappear on the screen. If the
  10799. control is already invisible, HideControl has no effect.
  10800.  
  10801. æKY ShowControl
  10802. æFc Controls.h
  10803. æT Function
  10804. æTN A957
  10805. æD pascal void ShowControl(ControlHandle theControl)
  10806.     = 0xA957; 
  10807. æDT ShowControl((ControlHandle) theControl);
  10808. æMM
  10809. æRT 197
  10810. æRI I-322, P-113, 114, 181
  10811. æC 
  10812. ShowControl makes theControl visible. The control is drawn in its window but may be
  10813. completely or partially obscured by overlapping windows or other objects. If the
  10814. control is already visible, ShowControl has no effect.
  10815.  
  10816. æKY DrawControls
  10817. æFc Controls.h
  10818. æT Function
  10819. æTN A969
  10820. æD pascal void DrawControls(WindowPtr theWindow)
  10821.     = 0xA969; 
  10822. æDT DrawControls((WindowPtr) theWindow);
  10823. æRT 203
  10824. æRI I-322, P-169
  10825. æC 
  10826. DrawControls draws all controls currently visible in theWindow. The controls are
  10827. drawn in reverse order of creation; thus in case of overlap the earliest-created
  10828. controls appear frontmost in the window.
  10829.  
  10830. Note:  Window Manager routines such as SelectWindow, ShowWindow, and
  10831.        BringToFront do not automatically call DrawControls to display
  10832.        the window’s controls. They just add the appropriate regions to
  10833.        the window’s update region, generating an update event. Your program
  10834.        should always call DrawControls explicitly upon receiving an update
  10835.        event for a window that contains controls.
  10836.  
  10837. æKY Draw1Control
  10838. æFc Controls.h
  10839. æT Function
  10840. æTN A96D
  10841. æD pascal void Draw1Control(ControlHandle theControl)
  10842.     = 0xA96D; 
  10843. æDT Draw1Control((ControlHandle) theControl);
  10844. æMM
  10845. æRI IV-53
  10846. æC 
  10847. [128K ROM]
  10848.  
  10849. Draw1Control draws the specified control if it’s visible within the window.
  10850.  
  10851. æKY HiliteControl
  10852. æFc Controls.h
  10853. æT Function
  10854. æTN A95D
  10855. æD pascal void HiliteControl(ControlHandle theControl,short hiliteState)
  10856.     = 0xA95D; 
  10857. æDT HiliteControl((ControlHandle) theControl,(short) hiliteState);
  10858. æMM
  10859. æRI I-322
  10860. æC 
  10861. HiliteControl changes the way theControl is highlighted. HiliteState has one of the
  10862. following values:
  10863.  
  10864.   •  The value 0 means no highlighting. (The control is active.)
  10865.   •  A value between 1 and 253 is interpreted as a part code designating
  10866.      the part of the (active) control to be highlighted.
  10867.   •  The value 255 means that the control is to be made inactive and
  10868.      highlighted accordingly.
  10869.  
  10870. Note:  The value 254 should not be used; this value is reserved for future use.
  10871.  
  10872. HiliteControl calls the control definition function to redraw the control with its
  10873. new highlighting.
  10874.  
  10875. æKY UpdtControl
  10876. æFc Controls.h
  10877. æT Function
  10878. æTN A953
  10879. æD pascal void UpdtControl(WindowPtr theWindow,RgnHandle updateRgn)
  10880.     = 0xA953; 
  10881. æDT UpdtControl((WindowPtr) theWindow,(RgnHandle) updateRgn);
  10882. æMM
  10883. æRI IV-53
  10884. æC  
  10885. [128K ROM]
  10886.  
  10887. UpdtControl is a faster version of the DrawControls procedure. Instead of drawing all
  10888. of the controls in theWindow, UpdtControl draws only the controls that are in the
  10889. specified update region. UpdtControl is called in response to an update event, and is
  10890. usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  10891. UpdateRgn should be set to the visRgn of theWindow’s port (for more details, see the
  10892. BeginUpdate procedure in the Window Manager chapter).
  10893.  
  10894. Note:  In general, controls are in a dialog box and are automatically
  10895.        drawn by the DrawDialog procedure.
  10896.  
  10897. æKY UpdateControls
  10898. æFc Controls.h
  10899. æT Function
  10900. æTN A953
  10901. æD pascal void UpdateControls(WindowPtr theWindow,RgnHandle updateRgn)
  10902.     = 0xA953; 
  10903. æDT UpdateControls((WindowPtr) theWindow,(RgnHandle) updateRgn);
  10904. æMM
  10905. æRI IV-53
  10906. æC  
  10907. [128K ROM]
  10908.  
  10909. UpdtControl is a faster version of the DrawControls procedure. Instead of drawing all
  10910. of the controls in theWindow, UpdtControl draws only the controls that are in the
  10911. specified update region. UpdtControl is called in response to an update event, and is
  10912. usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  10913. UpdateRgn should be set to the visRgn of theWindow’s port (for more details, see the
  10914. BeginUpdate procedure in the Window Manager chapter).
  10915.  
  10916. Note:  In general, controls are in a dialog box and are automatically
  10917.        drawn by the DrawDialog procedure.
  10918.  
  10919. æKY MoveControl
  10920. æFc Controls.h
  10921. æT Function
  10922. æTN A959
  10923. æD pascal void MoveControl(ControlHandle theControl,short h,short v)
  10924.     = 0xA959; 
  10925. æDT MoveControl((ControlHandle) theControl,(short) h,(short) v);
  10926. æMM
  10927. æRI I-325, P-113, 176
  10928. æC 
  10929. MoveControl moves theControl to a new location within its window. The top left corner
  10930. of the control’s enclosing rectangle is moved to the horizontal and vertical coordinates
  10931. h and v (given in the local coordinates of the control’s window); the bottom right
  10932. corner is adjusted accordingly, to keep the size of the rectangle the same as before.
  10933. If the control is currently visible, it’s hidden and then redrawn at its new location.
  10934.  
  10935. æKY SizeControl
  10936. æFc Controls.h
  10937. æT Function
  10938. æTN A95C
  10939. æD pascal void SizeControl(ControlHandle theControl,short w,short h)
  10940.     = 0xA95C; 
  10941. æDT SizeControl((ControlHandle) theControl,(short) w,(short) h);
  10942. æMM
  10943. æRI I-326, P-113, 181
  10944. æC 
  10945. SizeControl changes the size of theControl’s enclosing rectangle. The bottom right
  10946. corner of the rectangle is adjusted to set the rectangle’s width and height to the
  10947. number of pixels specified by w and h; the position of the top left corner is not
  10948. changed. If the control is currently visible, it’s hidden and then redrawn in its new
  10949. size.
  10950.  
  10951. æKY SetCtlValue
  10952. æFc Controls.h
  10953. æT Function
  10954. æTN A963
  10955. æD pascal void SetCtlValue(ControlHandle theControl,short theValue)
  10956.     = 0xA963; 
  10957. æDT SetCtlValue((ControlHandle) theControl,(short) theValue);
  10958. æMM
  10959. æRT 197
  10960. æRI I-326
  10961. æC 
  10962. SetCtlValue sets theControl’s current setting to theValue and redraws the control to
  10963. reflect the new setting. For check boxes and radio buttons, the value 1 fills the
  10964. control with the appropriate mark, and 0 clears it. For scroll bars, SetCtlValue
  10965. redraws the thumb where appropriate.
  10966.  
  10967. If the specified value is out of range, it’s forced to the nearest endpoint of the
  10968. current range (that is, if theValue is less than the minimum setting, SetCtlValue
  10969. sets the current setting to the minimum; if theValue is greater than the maximum
  10970. setting, it sets the current setting to the maximum).
  10971.  
  10972. æKY GetCtlValue
  10973. æFc Controls.h
  10974. æT Function
  10975. æTN A960
  10976. æD pascal short GetCtlValue(ControlHandle theControl)
  10977.     = 0xA960; 
  10978. æDT short myVariable = GetCtlValue((ControlHandle) theControl);
  10979. æRI I-326, P-114, 171
  10980. æC 
  10981. GetCtlValue returns theControl’s current setting.
  10982.  
  10983. æKY SetCtlMin
  10984. æFc Controls.h
  10985. æT Function
  10986. æTN A964
  10987. æD pascal void SetCtlMin(ControlHandle theControl,short minValue)
  10988.     = 0xA964; 
  10989. æDT SetCtlMin((ControlHandle) theControl,(short) minValue);
  10990. æMM
  10991. æRI I-326
  10992. æC 
  10993. Assembly-language note:  The macro you invoke to call SetCtlMin from
  10994.                          assembly language is named _SetMinCtl.
  10995.  
  10996. SetCtlMin sets theControl’s minimum setting to minValue and redraws the control to
  10997. reflect the new range. If the control’s current setting is less than minValue, the
  10998. setting is changed to the new minimum.
  10999.  
  11000. æKY GetCtlMin
  11001. æFc Controls.h
  11002. æT Function
  11003. æTN A961
  11004. æD pascal short GetCtlMin(ControlHandle theControl)
  11005.     = 0xA961; 
  11006. æDT short myVariable = GetCtlMin((ControlHandle) theControl);
  11007. æRI I-327
  11008. æC  
  11009. Assembly-language note:  The macro you invoke to call GetCtlMin from
  11010.                          assembly language is named _GetMinCtl.
  11011.  
  11012. GetCtlMin returns theControl’s minimum setting.
  11013.  
  11014. æKY SetCtlMax
  11015. æFc Controls.h
  11016. æT Function
  11017. æTN A965
  11018. æD pascal void SetCtlMax(ControlHandle theControl,short maxValue)
  11019.     = 0xA965; 
  11020. æDT SetCtlMax((ControlHandle) theControl,(short) maxValue);
  11021. æMM
  11022. æRI I-327
  11023. æC 
  11024. Assembly-language note:  The macro you invoke to call SetCtlMax from
  11025.                          assembly language is named _SetMaxCtl.
  11026.  
  11027. SetCtlMax sets theControl’s maximum setting to maxValue and redraws the control to
  11028. reflect the new range. If the control’s current setting is greater than maxValue, the
  11029. setting is changed to the new maximum.
  11030.  
  11031. Note:  If you set the maximum setting of a scroll bar equal to its minimum
  11032.        setting, the control definition function will make the scroll bar
  11033.        inactive.
  11034.  
  11035. æKY GetCtlMax
  11036. æFc Controls.h
  11037. æT Function
  11038. æTN A962
  11039. æD pascal short GetCtlMax(ControlHandle theControl)
  11040.     = 0xA962; 
  11041. æDT short myVariable = GetCtlMax((ControlHandle) theControl);
  11042. æRI I-327
  11043. æC 
  11044. Assembly-language note:  The macro you invoke to call GetCtlMax from
  11045.                          assembly language is named _GetMaxCtl.
  11046.  
  11047. GetCtlMax returns theControl’s maximum setting.
  11048.  
  11049. æKY SetCRefCon
  11050. æFc Controls.h
  11051. æT Function
  11052. æTN A95B
  11053. æD pascal void SetCRefCon(ControlHandle theControl,long data)
  11054.     = 0xA95B; 
  11055. æDT SetCRefCon((ControlHandle) theControl,(long) data);
  11056. æRI I-327
  11057. æC 
  11058. SetCRefCon sets theControl’s reference value to the given data.
  11059.  
  11060. æKY GetCRefCon
  11061. æFc Controls.h
  11062. æT Function
  11063. æTN A95A
  11064. æD pascal long GetCRefCon(ControlHandle theControl)
  11065.     = 0xA95A; 
  11066. æDT long myVariable = GetCRefCon((ControlHandle) theControl);
  11067. æRI I-327
  11068. æC 
  11069. GetCRefCon returns theControl’s current reference value.
  11070.  
  11071. æKY SetCtlAction
  11072. æFc Controls.h
  11073. æT Function
  11074. æTN A96B
  11075. æD pascal void SetCtlAction(ControlHandle theControl,ProcPtr actionProc)
  11076.     = 0xA96B; 
  11077. æDT SetCtlAction((ControlHandle) theControl,(ProcPtr) actionProc);
  11078. æRI I-328
  11079. æC 
  11080. SetCtlAction sets theControl’s default action procedure to actionProc.
  11081.  
  11082. æKY GetCtlAction
  11083. æFc Controls.h
  11084. æT Function
  11085. æTN A96A
  11086. æD pascal ProcPtr GetCtlAction(ControlHandle theControl)
  11087.     = 0xA96A; 
  11088. æDT ProcPtr myVariable = GetCtlAction((ControlHandle) theControl);
  11089. æRI I-328, IV-53
  11090. æC  
  11091. GetCtlAction returns a pointer to theControl’s default action procedure, if any. (It
  11092. returns whatever is in that field of the control record.)
  11093.  
  11094. æKY DragControl
  11095. æFc Controls.h
  11096. æT Function
  11097. æTN A967
  11098. æD pascal void DragControl(ControlHandle theControl,Point startPt,const Rect *limitRect,
  11099.     const Rect *slopRect,short axis)
  11100.     = 0xA967; 
  11101. æDT DragControl((ControlHandle) theControl,(Point) startPt,(const Rect *) limitRect,(
  11102.     const Rect) * slopRect,(short) axis);
  11103. æMM
  11104. æRI I-325
  11105. æC 
  11106. Called with the mouse button down inside theControl, DragControl pulls a dotted
  11107. outline of the control around the screen, following the movements of the mouse until
  11108. the button is released. When the mouse button is released, DragControl calls MoveControl
  11109. to move the control to the location to which it was dragged.
  11110.  
  11111. Note:  Before beginning to follow the mouse, DragControl calls the control
  11112.        definition function to allow it to do its own “custom dragging” if
  11113.        it chooses. If the definition function doesn’t choose to do any
  11114.        custom dragging, DragControl uses the default method of dragging
  11115.        described here.
  11116.  
  11117. The startPt, limitRect, slopRect, and axis parameters have the same meaning as for
  11118. the Window Manager function DragGrayRgn. These parameters are reviewed briefly below;
  11119. see the description of DragGrayRgn in the Window Manager chapter for more details.
  11120.  
  11121.   •  StartPt is assumed to be the point where the mouse button was originally
  11122.      pressed, in the local coordinates of the control’s window.
  11123.   •  LimitRect limits the travel of the control’s outline, and should normally
  11124.      coincide with or be contained within the window’s content region.
  11125.   •  SlopRect allows the user some “slop” in moving the mouse; it should
  11126.      completely enclose limitRect.
  11127.   •  The axis parameter allows you to constrain the control’s motion to
  11128.      only one axis. It has one of the following values:
  11129.  
  11130.        CONST  noConstraint = 0;    {no constraint}
  11131.               hAxisOnly    = 1;    {horizontal axis only}
  11132.               vAxisOnly    = 2;    {vertical axis only}
  11133.  
  11134. Assembly-language note:  Like TrackControl, DragControl invokes the
  11135.                          macro _DragTheRgn, so you can use the global
  11136.                          variables DragHook and DragPattern.
  11137.  
  11138. æKY TestControl
  11139. æFc Controls.h
  11140. æT Function
  11141. æTN A966
  11142. æD pascal short TestControl(ControlHandle theControl,Point thePt)
  11143.     = 0xA966; 
  11144. æDT short myVariable = TestControl((ControlHandle) theControl,(Point) thePt);
  11145. æMM
  11146. æRI I-325
  11147. æC  
  11148. If theControl is visible and active, TestControl tests which part of the control
  11149. contains thePoint (in the local coordinates of the control’s window); it returns the
  11150. corresponding part code, or 0 if the point is outside the control. If the control is
  11151. invisible or inactive, TestControl returns 0. TestControl is called by FindControl
  11152. and TrackControl; normally you won’t need to call it yourself.
  11153.  
  11154. æKY TrackControl
  11155. æFc Controls.h
  11156. æT Function
  11157. æTN A968
  11158. æD pascal short TrackControl(ControlHandle theControl,Point thePoint,ProcPtr actionProc)
  11159.     = 0xA968; 
  11160. æDT short myVariable = TrackControl((ControlHandle) theControl,(Point) thePoint,(ProcPtr) actionProc);
  11161. æMM
  11162. æRI I-323, P-114, 184
  11163. æC 
  11164. When the mouse button is pressed in a visible, active control, the application should
  11165. call TrackControl with theControl equal to the control handle and startPt equal to
  11166. the point where the mouse button was pressed (in the local coordinates of the control’s
  11167. window). TrackControl follows the movements of the mouse and responds in whatever way
  11168. is appropriate until the mouse button is released; the exact response depends on the
  11169. type of control and the part of the control in which the mouse button was pressed. If
  11170. highlighting is appropriate, TrackControl does the highlighting, and undoes it before
  11171. returning. When the mouse button is released, TrackControl returns with the part code
  11172. if the mouse is in the same part of the control that it was originally in, or with 0
  11173. if not
  11174. (in which case the application should do nothing).
  11175.  
  11176. If the mouse button was pressed in an indicator, TrackControl drags a dotted outline
  11177. of it to follow the mouse. When the mouse button is released, TrackControl calls the
  11178. control definition function to reposition the control’s indicator. The control definition
  11179. function for scroll bars responds by redrawing the thumb, calculating the control’s
  11180. current setting based on the new relative position of the thumb, and storing the
  11181. current setting in the control record; for example, if the minimum and maximum settings
  11182. are 0 and 10, and the thumb is in the middle of the scroll bar, 5 is stored as the
  11183. current setting. The application must then scroll to the corresponding relative
  11184. position in the document.
  11185.  
  11186. TrackControl may take additional actions beyond highlighting the control or dragging
  11187. the indicator, depending on the value passed in the actionProc parameter, as described
  11188. below. The following tells you what to pass for the standard control types; for a
  11189. custom control, what you pass will depend on how the control is defined.
  11190.  
  11191.   •  If actionProc is NIL, TrackControl performs no additional actions. This
  11192.      is appropriate for simple buttons, check boxes, radio buttons, and the
  11193.      thumb of a scroll bar.
  11194.   •  ActionProc may be a pointer to an action procedure that defines some
  11195.      action to be performed repeatedly for as long as the user holds down
  11196.      the mouse button. (See below for details.)
  11197.   •  If actionProc is POINTER(–1), TrackControl looks in the control record
  11198.      for a pointer to the control’s default action procedure. If that field
  11199.      of the control record contains a procedure pointer, TrackControl uses
  11200.      the action procedure it points to; if the field contains POINTER (–1),
  11201.      TrackControl calls the control definition function to perform the
  11202.      necessary action. (If the field contains NIL, TrackControl does nothing.)
  11203.  
  11204. The action procedure in the control definition function is described in the section
  11205. “Defining Your Own Controls”. The following paragraphs describe only the action
  11206. procedure whose pointer is passed in the actionProc parameter or stored in the control
  11207. record.
  11208.  
  11209. If the mouse button was pressed in an indicator, the action procedure (if any) should
  11210. have no parameters. This procedure must allow for the fact that the mouse may not be
  11211. inside the original control part.
  11212.  
  11213. If the mouse button was pressed in a control part other than an indicator, the action
  11214. procedure should be of the form
  11215.  
  11216. PROCEDURE MyAction (theControl:  ControlHandle; partCode:  INTEGER);
  11217.  
  11218. In this case, TrackControl passes the control handle and the part code to the action
  11219. procedure. (It passes 0 in the partCode parameter if the mouse has moved outside the
  11220. original control part.) As an example of this type of action procedure, consider what
  11221. should happen when the mouse button is pressed in a scroll arrow or paging region in
  11222. a scroll bar. For these cases, your action procedure should examine the part code to
  11223. determine exactly where the mouse button was pressed, scroll up or down a line or
  11224. page as appropriate, and call SetCtlValue to change the control’s setting and redraw
  11225. the thumb.
  11226.  
  11227. Warning:  Since it has a different number of parameters depending on whether
  11228.           the mouse button was pressed in an indicator or elsewhere, the
  11229.           action procedure you pass to TrackControl (or whose pointer you
  11230.           store in the control record) can be set up for only one case or
  11231.           the other. If you store a pointer to a default action procedure
  11232.           in a control record, be sure it will be used only when appropriate
  11233.           for that type of action procedure. The only way to specify actions
  11234.           in response to all mouse-down events in a control, regardless of
  11235.           whether they’re in an indicator, is via the control definition
  11236.           function.
  11237.  
  11238. Assembly-language note:  If you store a pointer to a procedure in the global
  11239.                          variable DragHook, that procedure will be called
  11240.                          repeatedly (with no parameters) for as long as the
  11241.                          user holds down the mouse button. TrackControl
  11242.                          invokes the Window Manager macro _DragTheRgn,
  11243.                          which calls the DragHook procedure. _DragTheRgn
  11244.                          uses the pattern stored in the global variable
  11245.                          DragPattern for the dragged outline of the indicator.
  11246.  
  11247. æKY FindControl
  11248. æFc Controls.h
  11249. æT Function
  11250. æTN A96C
  11251. æD pascal short FindControl(Point thePoint,WindowPtr theWindow,ControlHandle *theControl)
  11252.     = 0xA96C; 
  11253. æDT short myVariable = FindControl((Point) thePoint,(WindowPtr) theWindow,(ControlHandle *) theControl);
  11254. æMM
  11255. æRI I-323, P-98, 114, 170
  11256. æC  
  11257. When the Window Manager function FindWindow reports that the mouse button was pressed
  11258. in the content region of a window, and the window contains controls, the application
  11259. should call FindControl with theWindow equal to the window pointer and thePoint equal
  11260. to the point where the mouse button was pressed (in the window’s local coordinates).
  11261. FindControl tells which of the window’s controls, if any, the mouse button was pressed
  11262. in:
  11263.  
  11264.   •  If it was pressed in a visible, active control, FindControl sets the
  11265.      whichControl parameter to the control handle and returns a part code
  11266.      identifying the part of the control that it was pressed in.
  11267.   •  If it was pressed in an invisible or inactive control, or not in any
  11268.      control, FindControl sets whichControl to NIL and returns 0 as its result.
  11269.  
  11270. Warning:  Notice that FindControl expects the mouse point in the window’s
  11271.           local coordinates, whereas FindWindow expects it in global
  11272.           coordinates. Always be sure to convert the point to local
  11273.           coordinates with the QuickDraw procedure GlobalToLocal before
  11274.           calling FindControl.
  11275.  
  11276. Note:  FindControl also returns NIL for whichControl and 0 as its result
  11277.        if the window is invisible or doesn’t contain the given point. In
  11278.        these cases, however, FindWindow wouldn’t have returned this window
  11279.        in the first place, so the situation should never arise.
  11280.  
  11281. æKY SetCtlColor
  11282. æFc Controls.h
  11283. æT Function
  11284. æTN AA43
  11285. æD pascal void SetCtlColor(ControlHandle theControl,CCTabHandle newColorTable)
  11286.     = 0xAA43; 
  11287. æDT SetCtlColor((ControlHandle) theControl,(CCTabHandle) newColorTable);
  11288. æMM
  11289. æRI V-222
  11290. æC 
  11291. [Macintosh II]
  11292.  
  11293. The SetCtlColor procedure sets or modifies a control’s color table.  If the control
  11294. currently has no auxiliary control record, a new one is created with the given color
  11295. table and added to the head of the auxiliary control list. If there is already an
  11296. auxiliary record for the control, its color table is replaced by the contents of
  11297. newColorTable.
  11298.  
  11299. If newColorTable has the same contents as the default color table, the
  11300. control’s existing auxiliary record and color table are removed from the auxiliary
  11301. control list and deallocated.  If theControl = NIL, the operation modifies the default
  11302. color table itself. If the control is visible, it will be redrawn by SetCtlColor
  11303. using the new color table.
  11304.  
  11305. æKY GetAuxCtl
  11306. æFc Controls.h
  11307. æT Function
  11308. æTN AA44
  11309. æD pascal Boolean GetAuxCtl(ControlHandle theControl,AuxCtlHandle *acHndl)
  11310.     = 0xAA44; 
  11311. æDT Boolean myVariable = GetAuxCtl((ControlHandle) theControl,(AuxCtlHandle *) acHndl);
  11312. æMM
  11313. æRI V-222
  11314. æC 
  11315. [Macintosh II]
  11316.  
  11317. The GetAuxCtl function returns a handle to a control’s AuxCtlRec:
  11318.  
  11319.   •  If the given control has its own color table, the function returns TRUE.
  11320.   •  If the control used the default color set, the function returns FALSE.
  11321.   •  If the control asked to receive the default color set (theControl = NIL),
  11322.      then the function returns TRUE.
  11323.  
  11324. æKY GetCVariant
  11325. æFc Controls.h
  11326. æT Function
  11327. æTN A809
  11328. æD pascal short GetCVariant(ControlHandle theControl)
  11329.     = 0xA809; 
  11330. æDT short myVariable = GetCVariant((ControlHandle) theControl);
  11331. æRI V-222
  11332. æC 
  11333. [Macintosh Plus, Macintosh SE, and Macintosh II]
  11334.  
  11335. The GetVariant function returns the variant control value for the control described
  11336. by theControl. This value was formerly stored in the high four bits of the control
  11337. defproc handle; for future compatibility, use the GetCVariant routine to access this
  11338. value.
  11339.  
  11340. æKY dragcontrol
  11341. æFc Controls.h
  11342. æT Function
  11343. æD void dragcontrol(ControlHandle theControl,Point *startPt,const Rect *limitRect,
  11344.     const Rect *slopRect,short axis); 
  11345. æDT dragcontrol((ControlHandle) theControl,(Point *) startPt,(const Rect *) limitRect,(
  11346.     const Rect) * slopRect,(short) axis);
  11347. æMM
  11348. æRI I-325
  11349. æC 
  11350. Called with the mouse button down inside theControl, DragControl pulls a dotted
  11351. outline of the control around the screen, following the movements of the mouse until
  11352. the button is released. When the mouse button is released, DragControl calls MoveControl
  11353. to move the control to the location to which it was dragged.
  11354.  
  11355. Note:  Before beginning to follow the mouse, DragControl calls the control
  11356.        definition function to allow it to do its own “custom dragging” if
  11357.        it chooses. If the definition function doesn’t choose to do any
  11358.        custom dragging, DragControl uses the default method of dragging
  11359.        described here.
  11360.  
  11361. The startPt, limitRect, slopRect, and axis parameters have the same meaning as for
  11362. the Window Manager function DragGrayRgn. These parameters are reviewed briefly below;
  11363. see the description of DragGrayRgn in the Window Manager chapter for more details.
  11364.  
  11365.   •  StartPt is assumed to be the point where the mouse button was originally
  11366.      pressed, in the local coordinates of the control’s window.
  11367.   •  LimitRect limits the travel of the control’s outline, and should normally
  11368.      coincide with or be contained within the window’s content region.
  11369.   •  SlopRect allows the user some “slop” in moving the mouse; it should
  11370.      completely enclose limitRect.
  11371.   •  The axis parameter allows you to constrain the control’s motion to
  11372.      only one axis. It has one of the following values:
  11373.  
  11374.        CONST  noConstraint = 0;    {no constraint}
  11375.               hAxisOnly    = 1;    {horizontal axis only}
  11376.               vAxisOnly    = 2;    {vertical axis only}
  11377.  
  11378. Assembly-language note:  Like TrackControl, DragControl invokes the
  11379.                          macro _DragTheRgn, so you can use the global
  11380.                          variables DragHook and DragPattern.
  11381.  
  11382. æKY newcontrol
  11383. æFc Controls.h
  11384. æT Function
  11385. æTN A954
  11386. æD ControlHandle newcontrol(WindowPtr theWindow,const Rect *boundsRect,char *title,
  11387.     Boolean visible,short value,short min,short max,short procID,long refCon); 
  11388. æDT ControlHandle myVariable = newcontrol((WindowPtr) theWindow,(const Rect *) boundsRect,(char *) title,()
  11389.     Boolean visible,(short) value,(short) min,(short) max,(short) procID,(long) refCon);
  11390. æMM
  11391. æRI I-319, P-112, 114, 177
  11392. æC  
  11393. NewControl creates a control, adds it to the beginning of theWindow’s control list,
  11394. and returns a handle to the new control. The values passed as parameters are stored
  11395. in the corresponding fields of the control record, as described below. The field that
  11396. determines highlighting is set to 0 (no highlighting) and the pointer to the default
  11397. action procedure is set to NIL (none).
  11398.  
  11399. Note:  The control definition function may do additional initialization,
  11400.        including changing any of the fields of the control record. The only
  11401.        standard control for which additional initialization is done is the
  11402.        scroll bar; its control definition function allocates space for a
  11403.        region to hold the thumb and stores the region handle in the
  11404.        contrlData field of the control record.
  11405.  
  11406. TheWindow is the window the new control will belong to. All coordinates pertaining to
  11407. the control will be interpreted in this window’s local coordinate system.
  11408.  
  11409. BoundsRect, given in theWindow’s local coordinates, is the rectangle that encloses
  11410. the control and thus determines its size and location. Note the following about the
  11411. enclosing rectangle for the standard controls:
  11412.  
  11413.   •  Simple buttons are drawn to fit the rectangle exactly. (The control
  11414.      definition function calls the QuickDraw procedure FrameRoundRect.) To
  11415.      allow for the tallest characters in the system font, there should be
  11416.      at least a 20-point difference between the top and bottom coordinates
  11417.      of the rectangle.
  11418.   •  For check boxes and radio buttons, there should be at least a 16-point
  11419.      difference between the top and bottom coordinates.
  11420.   •  By convention, scroll bars are 16 pixels wide, so there should be a
  11421.      16-point difference between the left and right (or top and bottom)
  11422.      coordinates. (If there isn’t, the scroll bar will be scaled to fit
  11423.      the rectangle.) A standard scroll bar should be at least 48 pixels
  11424.      long, to allow room for the scroll arrows and thumb.
  11425.  
  11426. Title is the control’s title, if any (if none, you can just pass the empty string as
  11427. the title). Be sure the title will fit in the control’s enclosing rectangle; if it
  11428. won’t it will be truncated on the right for check boxes and radio buttons, or centered
  11429. and truncated on both ends for simple buttons.
  11430.  
  11431. Note:  Some non-Roman systems write text from right-to-left, in which
  11432.        case radio buttons and check boxes are drawn with their titles
  11433.        on the left of the control.  They are also truncated on the left.
  11434.        See the Script Manager chapter for more information.
  11435.  
  11436. If the visible parameter is TRUE, NewControl draws the control.
  11437.  
  11438. Note:  It does not use the standard window updating mechanism, but
  11439.        instead draws the control immediately in the window.
  11440.  
  11441. The min and max parameters define the control’s range of possible settings; the value
  11442. parameter gives the initial setting. For controls that don’t retain a setting, such
  11443. as buttons, the values you supply for these parameters will be stored in the control
  11444. record but will never be used. So it doesn’t matter what values you give for those
  11445. controls—0 for all three parameters will do. For controls that just retain an on-or-off
  11446. setting, such as check boxes or radio buttons, min should be 0 (meaning the control
  11447. is off) and max should be 1
  11448. (meaning it’s on). For dials, you can specify whatever values are appropriate for
  11449. min, max, and value.
  11450.  
  11451. ProcID is the control definition ID, which leads to the control definition function
  11452. for this type of control. (The function is read into memory if it
  11453. isn’t already in memory.) The control definition IDs for the standard control types
  11454. are listed above under “Controls and Resources”. Control definition IDs for custom
  11455. control types are discussed later under “Defining Your Own Controls”.
  11456.  
  11457. RefCon is the control’s reference value, set and used only by your application.
  11458.  
  11459. æKY findcontrol
  11460. æFc Controls.h
  11461. æT Function
  11462. æD short findcontrol(Point *thePoint,WindowPtr theWindow,ControlHandle *theControl); 
  11463. æDT short myVariable = findcontrol((Point *) thePoint,(WindowPtr) theWindow,(ControlHandle *) theControl);
  11464. æMM
  11465. æRI I-323, P-98, 114, 170
  11466. æC  
  11467. When the Window Manager function FindWindow reports that the mouse button was pressed
  11468. in the content region of a window, and the window contains controls, the application
  11469. should call FindControl with theWindow equal to the window pointer and thePoint equal
  11470. to the point where the mouse button was pressed (in the window’s local coordinates).
  11471. FindControl tells which of the window’s controls, if any, the mouse button was pressed
  11472. in:
  11473.  
  11474.   •  If it was pressed in a visible, active control, FindControl sets the
  11475.      whichControl parameter to the control handle and returns a part code
  11476.      identifying the part of the control that it was pressed in.
  11477.   •  If it was pressed in an invisible or inactive control, or not in any
  11478.      control, FindControl sets whichControl to NIL and returns 0 as its result.
  11479.  
  11480. Warning:  Notice that FindControl expects the mouse point in the window’s
  11481.           local coordinates, whereas FindWindow expects it in global
  11482.           coordinates. Always be sure to convert the point to local
  11483.           coordinates with the QuickDraw procedure GlobalToLocal before
  11484.           calling FindControl.
  11485.  
  11486. Note:  FindControl also returns NIL for whichControl and 0 as its result
  11487.        if the window is invisible or doesn’t contain the given point. In
  11488.        these cases, however, FindWindow wouldn’t have returned this window
  11489.        in the first place, so the situation should never arise.
  11490.  
  11491. æKY getctitle
  11492. æFc Controls.h
  11493. æT Function
  11494. æD void getctitle(ControlHandle theControl,char *title); 
  11495. æDT getctitle((ControlHandle) theControl,(char *) title);
  11496. æRI I-321
  11497. æC 
  11498. GetCTitle returns theControl’s title as the value of the title parameter.
  11499.  
  11500. æKY setctitle
  11501. æFc Controls.h
  11502. æT Function
  11503. æD void setctitle(ControlHandle theControl,char *title); 
  11504. æDT setctitle((ControlHandle) theControl,(char *) title);
  11505. æMM
  11506. æRI I-321
  11507. æC  
  11508. SetCTitle sets theControl’s title to the given string and redraws the control.
  11509.  
  11510. æKY trackcontrol
  11511. æFc Controls.h
  11512. æT Function
  11513. æD short trackcontrol(ControlHandle theControl,Point *thePoint,ProcPtr actionProc); 
  11514. æDT short myVariable = trackcontrol((ControlHandle) theControl,(Point *) thePoint,(ProcPtr) actionProc);
  11515. æMM
  11516. æRI I-323, P-114, 184
  11517. æC 
  11518. When the mouse button is pressed in a visible, active control, the application should
  11519. call TrackControl with theControl equal to the control handle and startPt equal to
  11520. the point where the mouse button was pressed (in the local coordinates of the control’s
  11521. window). TrackControl follows the movements of the mouse and responds in whatever way
  11522. is appropriate until the mouse button is released; the exact response depends on the
  11523. type of control and the part of the control in which the mouse button was pressed. If
  11524. highlighting is appropriate, TrackControl does the highlighting, and undoes it before
  11525. returning. When the mouse button is released, TrackControl returns with the part code
  11526. if the mouse is in the same part of the control that it was originally in, or with 0
  11527. if not
  11528. (in which case the application should do nothing).
  11529.  
  11530. If the mouse button was pressed in an indicator, TrackControl drags a dotted outline
  11531. of it to follow the mouse. When the mouse button is released, TrackControl calls the
  11532. control definition function to reposition the control’s indicator. The control definition
  11533. function for scroll bars responds by redrawing the thumb, calculating the control’s
  11534. current setting based on the new relative position of the thumb, and storing the
  11535. current setting in the control record; for example, if the minimum and maximum settings
  11536. are 0 and 10, and the thumb is in the middle of the scroll bar, 5 is stored as the
  11537. current setting. The application must then scroll to the corresponding relative
  11538. position in the document.
  11539.  
  11540. TrackControl may take additional actions beyond highlighting the control or dragging
  11541. the indicator, depending on the value passed in the actionProc parameter, as described
  11542. below. The following tells you what to pass for the standard control types; for a
  11543. custom control, what you pass will depend on how the control is defined.
  11544.  
  11545.   •  If actionProc is NIL, TrackControl performs no additional actions. This
  11546.      is appropriate for simple buttons, check boxes, radio buttons, and the
  11547.      thumb of a scroll bar.
  11548.   •  ActionProc may be a pointer to an action procedure that defines some
  11549.      action to be performed repeatedly for as long as the user holds down
  11550.      the mouse button. (See below for details.)
  11551.   •  If actionProc is POINTER(–1), TrackControl looks in the control record
  11552.      for a pointer to the control’s default action procedure. If that field
  11553.      of the control record contains a procedure pointer, TrackControl uses
  11554.      the action procedure it points to; if the field contains POINTER (–1),
  11555.      TrackControl calls the control definition function to perform the
  11556.      necessary action. (If the field contains NIL, TrackControl does nothing.)
  11557.  
  11558. The action procedure in the control definition function is described in the section
  11559. “Defining Your Own Controls”. The following paragraphs describe only the action
  11560. procedure whose pointer is passed in the actionProc parameter or stored in the control
  11561. record.
  11562.  
  11563. If the mouse button was pressed in an indicator, the action procedure (if any) should
  11564. have no parameters. This procedure must allow for the fact that the mouse may not be
  11565. inside the original control part.
  11566.  
  11567. If the mouse button was pressed in a control part other than an indicator, the action
  11568. procedure should be of the form
  11569.  
  11570. PROCEDURE MyAction (theControl:  ControlHandle; partCode:  INTEGER);
  11571.  
  11572. In this case, TrackControl passes the control handle and the part code to the action
  11573. procedure. (It passes 0 in the partCode parameter if the mouse has moved outside the
  11574. original control part.) As an example of this type of action procedure, consider what
  11575. should happen when the mouse button is pressed in a scroll arrow or paging region in
  11576. a scroll bar. For these cases, your action procedure should examine the part code to
  11577. determine exactly where the mouse button was pressed, scroll up or down a line or
  11578. page as appropriate, and call SetCtlValue to change the control’s setting and redraw
  11579. the thumb.
  11580.  
  11581. Warning:  Since it has a different number of parameters depending on whether
  11582.           the mouse button was pressed in an indicator or elsewhere, the
  11583.           action procedure you pass to TrackControl (or whose pointer you
  11584.           store in the control record) can be set up for only one case or
  11585.           the other. If you store a pointer to a default action procedure
  11586.           in a control record, be sure it will be used only when appropriate
  11587.           for that type of action procedure. The only way to specify actions
  11588.           in response to all mouse-down events in a control, regardless of
  11589.           whether they’re in an indicator, is via the control definition
  11590.           function.
  11591.  
  11592. Assembly-language note:  If you store a pointer to a procedure in the global
  11593.                          variable DragHook, that procedure will be called
  11594.                          repeatedly (with no parameters) for as long as the
  11595.                          user holds down the mouse button. TrackControl
  11596.                          invokes the Window Manager macro _DragTheRgn,
  11597.                          which calls the DragHook procedure. _DragTheRgn
  11598.                          uses the pattern stored in the global variable
  11599.                          DragPattern for the dragged outline of the indicator.
  11600.  
  11601. æKY testcontrol
  11602. æFc Controls.h
  11603. æT Function
  11604. æD short testcontrol(ControlHandle theControl,Point *thePt); 
  11605. æDT short myVariable = testcontrol((ControlHandle) theControl,(Point *) thePt);
  11606. æMM
  11607. æRI I-325
  11608. æC  
  11609. If theControl is visible and active, TestControl tests which part of the control
  11610. contains thePoint (in the local coordinates of the control’s window); it returns the
  11611. corresponding part code, or 0 if the point is outside the control. If the control is
  11612. invisible or inactive, TestControl returns 0. TestControl is called by FindControl
  11613. and TrackControl; normally you won’t need to call it yourself.
  11614.  
  11615.  
  11616. æKY CTBUtilities.h
  11617. æKL AppendDITL
  11618. CountDITL
  11619. CTBGetCTBVersion
  11620. CustomNBP
  11621. InitCTBUtilities
  11622. NuLookup
  11623. NuPLookup
  11624. ShortenDITL
  11625. StandardNBP
  11626.  
  11627. appendDITLBottom
  11628. appendDITLRight
  11629. chooseAborted
  11630. chooseCancel
  11631. chooseDisaster
  11632. chooseFailed
  11633. chooseOKMajor
  11634. chooseOKMinor
  11635. CTBUErr
  11636. ctbuGenericError
  11637. ctbuNoErr
  11638. curCTBUVersion
  11639. DITLMethod
  11640. hookCancel
  11641. hookEject
  11642. hookItemList
  11643. hookItemRefresh
  11644. hookKeyBase
  11645. hookLine
  11646. hookNull
  11647. hookOK
  11648. hookOutline
  11649. hookPostflight
  11650. hookPreflight
  11651. hookReserved1
  11652. hookReserved2
  11653. hookReserved3
  11654. hookReserved4
  11655. hookTitle
  11656. hookVersion
  11657. hookZoneList
  11658. hookZoneRefresh
  11659. hookZoneTitle
  11660. nameDisable
  11661. nameFilterProcPtr
  11662. NameFilterProcPtr
  11663. nameInclude
  11664. nameReject
  11665. NBPReply
  11666. nlCancel
  11667. nlEject
  11668. nlOk
  11669. NLType
  11670. NLTypeEntry
  11671. overlayDITL
  11672. zoneDisable
  11673. zoneFilterProcPtr
  11674. ZoneFilterProcPtr
  11675. zoneInclude
  11676. zoneReject
  11677.  
  11678. æKY curCTBUVersion
  11679. æFc CTBUtilities.h
  11680. æT 
  11681. æD     curCTBUVersion = 2,
  11682. æC 
  11683.  
  11684. æKY ctbuGenericError
  11685. æFc CTBUtilities.h
  11686. æT 
  11687. æD     ctbuGenericError = -1,
  11688. æC 
  11689.  
  11690. æKY ctbuNoErr
  11691. æFc CTBUtilities.h
  11692. æT 
  11693. æD     ctbuNoErr = 0,
  11694. æC 
  11695.  
  11696. æKY overlayDITL
  11697. æFc CTBUtilities.h
  11698. æT 
  11699. æD     overlayDITL = 0,
  11700. æC 
  11701.  
  11702. æKY appendDITLRight
  11703. æFc CTBUtilities.h
  11704. æT 
  11705. æD     appendDITLRight = 1,
  11706. æC 
  11707.  
  11708. æKY appendDITLBottom
  11709. æFc CTBUtilities.h
  11710. æT 
  11711. æD     appendDITLBottom = 2,
  11712. æC 
  11713.  
  11714. æKY chooseDisaster
  11715. æFc CTBUtilities.h
  11716. æT 
  11717. æD     chooseDisaster = -2,
  11718. æC 
  11719.  
  11720. æKY chooseFailed
  11721. æFc CTBUtilities.h
  11722. æT 
  11723. æD     chooseFailed = -1,
  11724. æC 
  11725.  
  11726. æKY chooseAborted
  11727. æFc CTBUtilities.h
  11728. æT 
  11729. æD     chooseAborted = 0,
  11730. æC 
  11731.  
  11732. æKY chooseOKMinor
  11733. æFc CTBUtilities.h
  11734. æT 
  11735. æD     chooseOKMinor = 1,
  11736. æC 
  11737.  
  11738. æKY chooseOKMajor
  11739. æFc CTBUtilities.h
  11740. æT 
  11741. æD     chooseOKMajor = 2,
  11742. æC 
  11743.  
  11744. æKY chooseCancel
  11745. æFc CTBUtilities.h
  11746. æT 
  11747. æD     chooseCancel = 3,
  11748. æC 
  11749.  
  11750. æKY nlOk
  11751. æFc CTBUtilities.h
  11752. æT 
  11753. æD     nlOk = 0,
  11754. æC 
  11755.  
  11756. æKY nlCancel
  11757. æFc CTBUtilities.h
  11758. æT 
  11759. æD     nlCancel = 1,
  11760. æC 
  11761.  
  11762. æKY nlEject
  11763. æFc CTBUtilities.h
  11764. æT 
  11765. æD     nlEject = 2,
  11766. æC 
  11767.  
  11768. æKY nameInclude
  11769. æFc CTBUtilities.h
  11770. æT 
  11771. æD     nameInclude = 1,
  11772. æC 
  11773.  
  11774. æKY nameDisable
  11775. æFc CTBUtilities.h
  11776. æT 
  11777. æD     nameDisable = 2,
  11778. æC 
  11779.  
  11780. æKY nameReject
  11781. æFc CTBUtilities.h
  11782. æT 
  11783. æD     nameReject = 3,
  11784. æC 
  11785.  
  11786. æKY zoneInclude
  11787. æFc CTBUtilities.h
  11788. æT 
  11789. æD     zoneInclude = 1,
  11790. æC 
  11791.  
  11792. æKY zoneDisable
  11793. æFc CTBUtilities.h
  11794. æT 
  11795. æD     zoneDisable = 2,
  11796. æC 
  11797.  
  11798. æKY zoneReject
  11799. æFc CTBUtilities.h
  11800. æT 
  11801. æD     zoneReject = 3,
  11802. æC 
  11803.  
  11804. æKY hookOK
  11805. æFc CTBUtilities.h
  11806. æT 
  11807. æD     hookOK = 1,
  11808. æC 
  11809.  
  11810. æKY hookCancel
  11811. æFc CTBUtilities.h
  11812. æT 
  11813. æD     hookCancel = 2,
  11814. æC 
  11815.  
  11816. æKY hookOutline
  11817. æFc CTBUtilities.h
  11818. æT 
  11819. æD     hookOutline = 3,
  11820. æC 
  11821.  
  11822. æKY hookTitle
  11823. æFc CTBUtilities.h
  11824. æT 
  11825. æD     hookTitle = 4,
  11826. æC 
  11827.  
  11828. æKY hookItemList
  11829. æFc CTBUtilities.h
  11830. æT 
  11831. æD     hookItemList = 5,
  11832. æC 
  11833.  
  11834. æKY hookZoneTitle
  11835. æFc CTBUtilities.h
  11836. æT 
  11837. æD     hookZoneTitle = 6,
  11838. æC 
  11839.  
  11840. æKY hookZoneList
  11841. æFc CTBUtilities.h
  11842. æT 
  11843. æD     hookZoneList = 7,
  11844. æC 
  11845.  
  11846. æKY hookLine
  11847. æFc CTBUtilities.h
  11848. æT 
  11849. æD     hookLine = 8,
  11850. æC 
  11851.  
  11852. æKY hookVersion
  11853. æFc CTBUtilities.h
  11854. æT 
  11855. æD     hookVersion = 9,
  11856. æC 
  11857.  
  11858. æKY hookReserved1
  11859. æFc CTBUtilities.h
  11860. æT 
  11861. æD     hookReserved1 = 10,
  11862. æC 
  11863.  
  11864. æKY hookReserved2
  11865. æFc CTBUtilities.h
  11866. æT 
  11867. æD     hookReserved2 = 11,
  11868. æC 
  11869.  
  11870. æKY hookReserved3
  11871. æFc CTBUtilities.h
  11872. æT 
  11873. æD     hookReserved3 = 12,
  11874. æC 
  11875.  
  11876. æKY hookReserved4
  11877. æFc CTBUtilities.h
  11878. æT 
  11879. æD     hookReserved4 = 13,
  11880. æC 
  11881.  
  11882. æKY hookNull
  11883. æFc CTBUtilities.h
  11884. æT 
  11885. æD     hookNull = 100,
  11886. æC 
  11887.  
  11888. æKY hookItemRefresh
  11889. æFc CTBUtilities.h
  11890. æT 
  11891. æD     hookItemRefresh = 101,
  11892. æC 
  11893.  
  11894. æKY hookZoneRefresh
  11895. æFc CTBUtilities.h
  11896. æT 
  11897. æD     hookZoneRefresh = 102,
  11898. æC 
  11899.  
  11900. æKY hookEject
  11901. æFc CTBUtilities.h
  11902. æT 
  11903. æD     hookEject = 103,
  11904. æC 
  11905.  
  11906. æKY hookPreflight
  11907. æFc CTBUtilities.h
  11908. æT 
  11909. æD     hookPreflight = 104,
  11910. æC 
  11911.  
  11912. æKY hookPostflight
  11913. æFc CTBUtilities.h
  11914. æT 
  11915. æD     hookPostflight = 105,
  11916. æC 
  11917.  
  11918. æKY hookKeyBase
  11919. æFc CTBUtilities.h
  11920. æT 
  11921. æD     hookKeyBase = 1000,
  11922. æC 
  11923.  
  11924. æKY CTBUErr
  11925. æFc CTBUtilities.h
  11926. æT typedef
  11927. æD typedef OSErr CTBUErr;
  11928. æC 
  11929.  
  11930. æKY DITLMethod
  11931. æFc CTBUtilities.h
  11932. æT typedef
  11933. æD typedef short DITLMethod;
  11934. æC 
  11935.  
  11936. æKY NLTypeEntry
  11937. æFc CTBUtilities.h
  11938. æT struct
  11939. æD struct NLTypeEntry {
  11940.     Handle hIcon;
  11941.     Str32 typeStr;
  11942. };
  11943.  
  11944. typedef struct NLTypeEntry NLTypeEntry;
  11945. æC 
  11946.  
  11947. æKY NLType
  11948. æFc CTBUtilities.h
  11949. æT typedef
  11950. æD typedef NLTypeEntry NLType[4];
  11951. æC 
  11952.  
  11953. æKY NBPReply
  11954. æFc CTBUtilities.h
  11955. æT struct
  11956. æD struct NBPReply {
  11957.     EntityName theEntity;
  11958.     AddrBlock theAddr;
  11959. };
  11960.  
  11961. typedef struct NBPReply NBPReply;
  11962. æC 
  11963.  
  11964. æKY NameFilterProcPtr
  11965. æFc CTBUtilities.h
  11966. æT typedef
  11967. æD typedef pascal short (*NameFilterProcPtr)(EntityName theEntity);
  11968. æC 
  11969.  
  11970. æKY ZoneFilterProcPtr
  11971. æFc CTBUtilities.h
  11972. æT typedef
  11973. æD typedef pascal short (*ZoneFilterProcPtr)(Str32 theZone);
  11974. æC 
  11975.  
  11976. æKY nameFilterProcPtr
  11977. æFc CTBUtilities.h
  11978. æT typedef
  11979. æD typedef NameFilterProcPtr nameFilterProcPtr;
  11980. æC 
  11981.  
  11982. æKY zoneFilterProcPtr
  11983. æFc CTBUtilities.h
  11984. æT typedef
  11985. æD typedef ZoneFilterProcPtr zoneFilterProcPtr;
  11986. æC 
  11987.  
  11988. æKY InitCTBUtilities
  11989. æFc CTBUtilities.h
  11990. æT Function
  11991. æD pascal CTBUErr InitCTBUtilities(void); 
  11992. æDT CTBUErr myVariable = InitCTBUtilities()(void);
  11993. æC 
  11994.  
  11995. æKY CTBGetCTBVersion
  11996. æFc CTBUtilities.h
  11997. æT Function
  11998. æD pascal short CTBGetCTBVersion(void); 
  11999. æDT short myVariable = CTBGetCTBVersion()(void);
  12000. æC 
  12001.  
  12002. æKY AppendDITL
  12003. æFc CTBUtilities.h
  12004. æT Function
  12005. æD pascal void AppendDITL(DialogPtr theDialog,Handle theDITL,DITLMethod method); 
  12006. æDT AppendDITL((DialogPtr) theDialog,(Handle) theDITL,(DITLMethod) method);
  12007. æC 
  12008.  
  12009. æKY CountDITL
  12010. æFc CTBUtilities.h
  12011. æT Function
  12012. æD pascal short CountDITL(DialogPtr theDialog); 
  12013. æDT short myVariable = CountDITL((DialogPtr) theDialog);
  12014. æC 
  12015.  
  12016. æKY ShortenDITL
  12017. æFc CTBUtilities.h
  12018. æT Function
  12019. æD pascal void ShortenDITL(DialogPtr theDialog,short numberItems); 
  12020. æDT ShortenDITL((DialogPtr) theDialog,(short) numberItems);
  12021. æC 
  12022.  
  12023. æKY NuLookup
  12024. æFc CTBUtilities.h
  12025. æT Function
  12026. æD pascal short NuLookup(Point where,ConstStr255Param prompt,short numTypes,
  12027.     NLType typeList,NameFilterProcPtr nameFilter,ZoneFilterProcPtr zoneFilter,
  12028.     DlgHookProcPtr hookProc,NBPReply *theReply); 
  12029. æDT short myVariable = NuLookup((Point) where,(ConstStr255Param) prompt,(short) numTypes,()
  12030.     NLType typeList,(NameFilterProcPtr) nameFilter,(ZoneFilterProcPtr) zoneFilter,()
  12031.     DlgHookProcPtr hookProc,(NBPReply *) theReply);
  12032. æC 
  12033.  
  12034. æKY NuPLookup
  12035. æFc CTBUtilities.h
  12036. æT Function
  12037. æD pascal short NuPLookup(Point where,ConstStr255Param prompt,short numTypes,
  12038.     NLType typeList,NameFilterProcPtr nameFilter,ZoneFilterProcPtr zoneFilter,
  12039.     DlgHookProcPtr hookProc,long userData,short dialogID,ModalFilterProcPtr filterProc,
  12040.     NBPReply *theReply); 
  12041. æDT short myVariable = NuPLookup((Point) where,(ConstStr255Param) prompt,(short) numTypes,()
  12042.     NLType typeList,(NameFilterProcPtr) nameFilter,(ZoneFilterProcPtr) zoneFilter,()
  12043.     DlgHookProcPtr hookProc,(long) userData,(short) dialogID,(ModalFilterProcPtr) filterProc,(
  12044.     NBPReply) * theReply);
  12045. æC 
  12046.  
  12047. æKY StandardNBP
  12048. æFc CTBUtilities.h
  12049. æT Function
  12050. æD pascal short StandardNBP(Point where,ConstStr255Param prompt,short numTypes,
  12051.     NLType typeList,NameFilterProcPtr nameFilter,ZoneFilterProcPtr zoneFilter,
  12052.     DlgHookProcPtr hookProc,NBPReply *theReply); 
  12053. æDT short myVariable = StandardNBP((Point) where,(ConstStr255Param) prompt,(short) numTypes,()
  12054.     NLType typeList,(NameFilterProcPtr) nameFilter,(ZoneFilterProcPtr) zoneFilter,()
  12055.     DlgHookProcPtr hookProc,(NBPReply *) theReply);
  12056. æC 
  12057.  
  12058. æKY CustomNBP
  12059. æFc CTBUtilities.h
  12060. æT Function
  12061. æD pascal short CustomNBP(Point where,ConstStr255Param prompt,short numTypes,
  12062.     NLType typeList,NameFilterProcPtr nameFilter,ZoneFilterProcPtr zoneFilter,
  12063.     DlgHookProcPtr hookProc,long userData,short dialogID,ModalFilterProcPtr filterProc,
  12064.     NBPReply *theReply); 
  12065. æDT short myVariable = CustomNBP((Point) where,(ConstStr255Param) prompt,(short) numTypes,()
  12066.     NLType typeList,(NameFilterProcPtr) nameFilter,(ZoneFilterProcPtr) zoneFilter,()
  12067.     DlgHookProcPtr hookProc,(long) userData,(short) dialogID,(ModalFilterProcPtr) filterProc,(
  12068.     NBPReply) * theReply);
  12069. æC 
  12070.  
  12071.  
  12072. æKY Ctype.h
  12073. æKL _tolower
  12074. _toupper
  12075. isalnum
  12076. isalpha
  12077. isascii
  12078. iscntrl
  12079. isdigit
  12080. isgraph
  12081. islower
  12082. isprint
  12083. ispunct
  12084. isspace
  12085. isupper
  12086. isxdigit
  12087. toascii
  12088. tolower
  12089. toupper
  12090.  
  12091. æKY isalpha
  12092. isupper
  12093. islower
  12094. isdigit
  12095. isxdigit
  12096. isalnum
  12097. isspace
  12098. ispunct
  12099. isprint
  12100. isgraph
  12101. iscntrl
  12102. isascii
  12103. æFc CType.h
  12104. æC These functions tell whether a given character is in one of 
  12105. several categories: alphabetical, uppercase, lowercase, digit, 
  12106. hex digit, white-space, punctuation mark, printing, graphic, or 
  12107. control. A separate function is provided for each category.
  12108.  
  12109.                           Synopsis
  12110.  
  12111. #include <CType.h>
  12112. int isalpha(int c);
  12113. int isupper(int c);
  12114. int islower(int c);
  12115. int isdigit(int c);
  12116. int isxdigit(int c);
  12117. int isalnum(int c);
  12118. int isspace(int c);
  12119. int ispunct(int c);
  12120. int isprint(int c);
  12121. int isgraph(int c);
  12122. int iscntrl(int c);
  12123. int isascii(int c);
  12124.  
  12125.                            Description
  12126.  
  12127. These macros return nonzero for true, zero for false, 
  12128. depending on the corresponding integer value of the given 
  12129. character. The isascii macro is defined on all integer values; 
  12130. the rest are defined only where isascii is true and on the 
  12131. single non-ASCII value EOF(–1).  
  12132.  
  12133. Table 3-1 shows when these macros return the value true.
  12134. Table 3-1    Character-testing macros
  12135.  
  12136. Macro    Returns true if
  12137.  
  12138. isascii; c is an ASCII character code lower than128.
  12139. isalpha; c is a letter [A–Z] or [a–z].
  12140. isupper; c is an uppercase letter [A–Z].
  12141. islower; c is a lowercase letter [a–z].
  12142. isdigit; c is a digit [0–9].
  12143. isxdigit; c is a hexadecimal digit [0–9], [A–F], or [a–f].
  12144. isalnum; c is alphanumeric (letter or digit).
  12145. isspace; c is a space, tab, return, new line, vertical tab, or form feed.
  12146. ispunct; c is a punctuation character (neither control nor alphanumeric).
  12147. isprint; c is a printing character, space (32) through tilde (126).
  12148. isgraph; c is a printing character, similar to isprint except false for space.
  12149. iscntrl; c is a delete character (127) or an ordinary control character 
  12150.  (less than 32).
  12151.  
  12152.                            Note
  12153.  
  12154. These macros do not support the Macintosh extended character 
  12155. set. For values outside the domain, the result is undefined.
  12156.  
  12157.                            Warning
  12158.  
  12159. If c is not in the domain of the function, the result is undefined.  
  12160.  
  12161. See also
  12162. Character case
  12163.  
  12164. æKY toupper
  12165. tolower
  12166. _toupper
  12167. _tolower
  12168. toascii
  12169. æFc CType.h
  12170. æC The first four of these routines change the case of a character. 
  12171. The toascii function converts any character to an ASCII character.
  12172.  
  12173.                           Synopsis
  12174.  
  12175. #include <CType.h>
  12176. int toupper(int c);
  12177. int tolower(int c);
  12178. int _toupper(int c);
  12179. int _tolower(int c);
  12180. int toascii(int c);
  12181.  
  12182.                            Description
  12183.  
  12184. The toupper; and tolower; functions have as their domain the 
  12185. set of ASCII characters (0 through 127) and the constant EOF (–
  12186. 1). If parameter c to toupper represents a lowercase letter, the 
  12187. result is the corresponding uppercase letter. If parameter c to 
  12188. tolower represents an uppercase letter, the result is the 
  12189. corresponding lowercase letter. All other parameters in the 
  12190. domain are returned unchanged.
  12191.  
  12192. The _toupper; and _tolower; macros produce the same 
  12193. results as functions toupper and tolower but have restricted 
  12194. domains and are faster. Macro _toupper requires a lowercase 
  12195. letter as its parameter; its result is the corresponding 
  12196. uppercase letter. Macro _tolower requires an uppercase letter 
  12197. as its parameter; its result is the corresponding lowercase 
  12198. letter. Parameters outside the domain cause undefined results.
  12199. The toascii; macro converts c by clearing all bits that are not 
  12200. part of a standard ASCII character. It is used for compatibility 
  12201. with other systems.
  12202.  
  12203.                            Note
  12204.  
  12205. These routines do not support the Macintosh extended 
  12206. character set (with values greater than 0x7F). For values 
  12207. outside the stated domain, the result is undefined.
  12208.  
  12209.                            Warning
  12210.  
  12211. The _toupper and _tolower macros must be used with care: 
  12212. parameters outside their respective domains cause undefined 
  12213. results. The _toupper macro requires a lowercase letter as its 
  12214. parameter: the _tolower macro requires an uppercase letter as 
  12215. its parameter.
  12216.  
  12217. See also
  12218. Character testing
  12219.  
  12220.  
  12221. æKY isalphaæ
  12222. æDT 
  12223. int myVariable = isalpha((int) c);
  12224.  
  12225. æKY isupperæ
  12226. æDT 
  12227. int myVariable = isupper((int) c);
  12228.  
  12229. æKY isloweræ
  12230. æDT 
  12231. int myVariable = islower((int) c);
  12232.  
  12233. æKY isdigitæ
  12234. æDT 
  12235. int myVariable = isdigit((int) c);
  12236.  
  12237. æKY isxdigitæ
  12238. æDT 
  12239. int myVariable = isxdigit((int) c);
  12240.  
  12241. æKY isalnumæ
  12242. æDT 
  12243. int myVariable = isalnum((int) c);
  12244.  
  12245. æKY isspaceæ
  12246. æDT 
  12247. int myVariable = isspace((int) c);
  12248.  
  12249.  
  12250. æKY ispunctæ
  12251. æDT 
  12252. int myVariable = ispunct((int) c);
  12253.  
  12254.  
  12255. æKY isprintæ
  12256. æDT 
  12257. int myVariable = isprint((int) c);
  12258.  
  12259. æKY isgraphæ
  12260. æDT 
  12261. int myVariable = isgraph((int) c);
  12262.  
  12263. æKY iscntrlæ
  12264. æDT 
  12265. int myVariable = iscntrl((int) c);
  12266.  
  12267. æKY isasciiæ
  12268. æDT 
  12269. int my Variable = isascii((int) c);
  12270.  
  12271.  
  12272. æKY toupperæ
  12273. æDT 
  12274. int myVariable = toupper((int) c);
  12275.  
  12276. æKY toloweræ
  12277. æDT 
  12278. int myVariable = tolower((int) c);
  12279.  
  12280. æKY _toupperæ
  12281. æDT 
  12282. int myVariable =  _toupper((int) c);
  12283.  
  12284.  
  12285. æKY _toloweræ
  12286. æDT 
  12287. int myVariable =  _toupper((int) c);
  12288.  
  12289.  
  12290. æKY toasciiæ
  12291. æDT 
  12292. int myVariable = toascii((int) c);
  12293.  
  12294.  
  12295. æKY CursorCtl.h
  12296. æKL Hide_Cursor
  12297. InitCursorCtl
  12298. RotateCursor
  12299. Show_Cursor
  12300. SpinCursor
  12301.  
  12302. acur
  12303. Acur
  12304. acurHandle
  12305. acurPtr
  12306. ARROW_CURSOR
  12307. CROSS_CURSOR
  12308. Cursors
  12309. HIDDEN_CURSOR
  12310. I_BEAM_CURSOR
  12311. PLUS_CURSOR
  12312. WATCH_CURSOR
  12313.  
  12314. æKY Acur
  12315. acur
  12316. acurPtr
  12317. acurHandle
  12318. æFc CursorCtl.h
  12319. æT struct
  12320. æD struct Acur {
  12321.     short n;        /*Number of cursors ("frames of film")*/
  12322.     short index;    /* Next frame to show <for internal use>*/
  12323.     short frame1;   /*'CURS' resource id for frame #1*/
  12324.     short fill1;    /*<for internal use>*/
  12325.     short frame2;   /*'CURS' resource id for frame #2*/
  12326.     short fill2;    /*<for internal use>*/
  12327.     short frameN;   /*'CURS' resource id for frame #N*/
  12328.     short fillN;    /*<for internal use>*/
  12329. };
  12330. typedef struct Acur acur,*acurPtr,**acurHandle;
  12331.  
  12332. æKY Cursors
  12333. HIDDEN_CURSOR
  12334. I_BEAM_CURSOR
  12335. CROSS_CURSOR
  12336. PLUS_CURSOR
  12337. WATCH_CURSOR
  12338. ARROW_CURSOR
  12339. æFc CursorCtl.h
  12340. æD enum {HIDDEN_CURSOR,I_BEAM_CURSOR,CROSS_CURSOR,PLUS_CURSOR,WATCH_CURSOR,
  12341. ARROW_CURSOR}Cursors;
  12342. typedef unsigned char Cursors;
  12343.  
  12344. æKY Hide_Cursor
  12345. æFc CursorCtl.h
  12346. æT Function
  12347. æD pascal void Hide_Cursor(void);
  12348. æDT Hide_Cursor();
  12349. æC 
  12350. /* 
  12351.     Hide the cursor if it is showing.This is this unit's call to the Mac
  12352.     HideCursor routine.Thus the Mac cursor level is decremented by one when this
  12353.     routine is called.
  12354. */
  12355.  
  12356. æKY InitCursorCtl
  12357. æFc CursorCtl.h
  12358. æT Function
  12359. æD pascal void InitCursorCtl(acurHandle newCursors);
  12360. æDT InitCursorCtl((acurHandle)newCursors);
  12361. æC 
  12362. /* 
  12363.     Initialize the CursorCtl unit. This should be called once prior to calling
  12364.     RotateCursor or SpinCursor. It need not be called if only Hide_Cursor or
  12365.     Show_Cursor are used. If NewCursors is NULL, InitCursorCtl loads in the
  12366.     'acur' resource and the 'CURS' resources specified by the 'acur' resource
  12367.     ids.  If any of the resources cannot be loaded, the cursor will not be
  12368.     changed.
  12369.     
  12370.     The 'acur' resource is assumed to either be in the currently running tool or
  12371.     application, or the MPW Shell for a tool, or in the System file.  The 'acur'
  12372.     resource id must be 0 for a tool or application, 1 for the Shell, and 2 for
  12373.     the System file.
  12374.     
  12375.     If NewCursors is not NULL, it is ASSUMED to be a handle to an 'acur' formatted
  12376.     resource designated by the caller and it will be used instead of doing a
  12377.     GetResource on 'acur'. Note, if RotateCursor or SpinCursor are called without
  12378.     calling InitCursorCtl, then RotateCursor and SpinCursor will do the call for
  12379.     the user the first time it is called.  However, the possible disadvantage of
  12380.     using this technique is that the resource memory allocated may have
  12381.     undesirable affect (fragmentation?) on the application. Using InitCursorCtl
  12382.     has the advantage of causing the allocation at a specific time determined by
  12383.     the user.
  12384.     
  12385.     Caution: InitCursorCtl MODIFIES the 'acur' resource in memory.  Specifically,
  12386.     it changes each FrameN/fillN integer pair to a handle to the corresponding
  12387.     'CURS' resource also in memory.  Thus if NewCursors is not NULL when
  12388.     InitCursorCtl is called, the caller must guarantee NewCursors always points to
  12389.     a "fresh" copy of an 'acur' resource.  This need only be of concern to a
  12390.     caller who wants to repeatly use multiple 'acur' resources during execution of
  12391.     their programs.
  12392. */
  12393.  
  12394. æKY RotateCursor
  12395. æFc CursorCtl.h
  12396. æT Function
  12397. æD pascal void RotateCursor(long counter);
  12398. æDT RotateCursor((long)counter);
  12399. æC 
  12400. /* 
  12401.     RotateCursor is called to rotate the "I am active" "beach ball" cursor, or to
  12402.     animate whatever sequence of cursors set up by InitCursorCtl. The next cursor
  12403.     ("frame") is used when Counter % 32 = 0 (Counter is some kind of incrementing
  12404.     or decrementing index maintained by the caller). A positive counter sequences
  12405.     forward through the cursors (e.g., it rotates the "beach ball" cursor
  12406.     clockwise), and a negative cursor sequences through the cursors backwards
  12407.     (e.g., it rotates the "beach ball" cursor counterclockwise).  Note,
  12408.     RotateCursor just does a Mac SetCursor call for the proper cursor picture.
  12409.       It is assumed the cursor is visible from a prior Show_Cursor call.
  12410. */
  12411.  
  12412. æKY Show_Cursor
  12413. æFc CursorCtl.h
  12414. æT Function
  12415. æD pascal void Show_Cursor(Cursors cursorKind);
  12416. æDT Show_Cursor((Cursors)cursorKind);
  12417. æC 
  12418. /* 
  12419.     Increment the cursor level, which may have been decremented by Hide_Cursor,
  12420.     and display the specified cursor if the level becomes 0 (it is never
  12421.     incremented beyond 0).The CursorKind is the kind of cursor to show.  It is
  12422.     one of the values HIDDEN_CURSOR, I_BEAM_CURSOR, CROSS_CURSOR, PLUS_CURSOR,
  12423.     WATCH_CURSOR, and ARROW_CURSOR. Except for HIDDEN_CURSOR, a Mac SetCursor is 
  12424.     done for the specified cursor prior to doing a ShowCursor.  HIDDEN_CURSOR just
  12425.     causes a ShowCursor call.  Note, ARROW_CURSOR will only work correctly if
  12426.     there is already a grafPort set up pointed to by 0(A5).
  12427. */
  12428.  
  12429. æKY SpinCursor
  12430. æFc CursorCtl.h
  12431. æT Function
  12432. æD pascal void SpinCursor(short increment);
  12433. æDT SpinCursor((short)increment);
  12434. æC 
  12435. /* 
  12436.     SpinCursor is similar in function to RotateCursor, except that instead of
  12437.     passing a counter, an Increment is passed an added to a counter maintained
  12438.     here.  SpinCursor is provided for those users who do not happen to have a
  12439.     convenient counter handy but still want to use the spinning "beach ball"
  12440.     cursor, or any sequence of cursors set up by InitCursorCtl.  A positive 
  12441.     increment sequences forward through the curos (rotating the "beach ball"
  12442.     cursor clockwise), and a negative increment sequences backward through the
  12443.     cursors (rotating the "beach ball" cursor counter-clockwise).  A zero value
  12444.     for the increment resets the counter to zero.  Note, it is the increment, and
  12445.     not the value of the counter that determines the sequencing direction of the
  12446.     cursor (and hence the spin direction of the "beach ball" cursor).
  12447. */
  12448.  
  12449.  
  12450.  
  12451. æKY DatabaseAccess.h
  12452. æKL DBBreak
  12453. DBDisposeQuery
  12454. DBEnd
  12455. DBExec
  12456. DBGetConnInfo
  12457. DBGetErr
  12458. DBGetItem
  12459. DBGetNewQuery
  12460. DBGetQueryResults
  12461. DBGetResultHandler
  12462. DBGetSessionNum
  12463. DBInit
  12464. DBInstallResultHandler
  12465. DBKill
  12466. DBRemoveResultHandler
  12467. DBResultsToText
  12468. DBSend
  12469. DBSendItem
  12470. DBStartQuery
  12471. DBState
  12472. DBUnGetItem
  12473. InitDBPack
  12474.  
  12475. ColInfoArray
  12476. ColInfoHandle
  12477. ColInfoPtr
  12478. ColTypesArray
  12479. ColTypesHandle
  12480. ColTypesPtr
  12481. DBAsyncParamBlockRec
  12482. DBAsyncParmBlkPtr
  12483. DBColInfoRecord
  12484. DBType
  12485. kDBAboutToInit
  12486. kDBExecComplete
  12487. kDBGetItemComplete
  12488. kDBGetQueryResultsComplete
  12489. kDBInitComplete
  12490. kDBLastColFlag
  12491. kDBNullFlag
  12492. kDBSendComplete
  12493. kDBStartQueryComplete
  12494. kDBUpdateWind
  12495. kDBWaitForever
  12496. QueryArray
  12497. QueryHandle
  12498. QueryListHandle
  12499. QueryListPtr
  12500. QueryPtr
  12501. QueryRecord
  12502. rcDBAsyncNotSupp
  12503. rcDBBadAsyncPB
  12504. rcDBBadDDEV
  12505. rcDBBadSessID
  12506. rcDBBadSessNum
  12507. rcDBBadType
  12508. rcDBBreak
  12509. rcDBError
  12510. rcDBExec
  12511. rcDBNoHandler
  12512. rcDBNull
  12513. rcDBPackNotInited
  12514. rcDBValue
  12515. rcDBWrongVersion
  12516. ResListElem
  12517. ResListHandle
  12518. ResListPtr
  12519. ResultsRecord
  12520. typeAnyType
  12521. typeColBreak
  12522. typeDate
  12523. typeDecimal
  12524. typeDiscard
  12525. typeLBin
  12526. typeLChar
  12527. typeMoney
  12528. typeNone
  12529. typeRowBreak
  12530. typeTime
  12531. typeTimeStamp
  12532. typeUnknown
  12533. typeVBin
  12534. typeVChar
  12535.  
  12536. æKY rcDBNull
  12537. æFc DatabaseAccess.h
  12538. æT 
  12539. æD     rcDBNull = -800,
  12540. æC 
  12541.  
  12542. æKY rcDBValue
  12543. æFc DatabaseAccess.h
  12544. æT 
  12545. æD     rcDBValue = -801,
  12546. æC 
  12547.  
  12548. æKY rcDBError
  12549. æFc DatabaseAccess.h
  12550. æT 
  12551. æD     rcDBError = -802,
  12552. æC 
  12553.  
  12554. æKY rcDBBadType
  12555. æFc DatabaseAccess.h
  12556. æT 
  12557. æD     rcDBBadType = -803,
  12558. æC 
  12559.  
  12560. æKY rcDBBreak
  12561. æFc DatabaseAccess.h
  12562. æT 
  12563. æD     rcDBBreak = -804,
  12564. æC 
  12565.  
  12566. æKY rcDBExec
  12567. æFc DatabaseAccess.h
  12568. æT 
  12569. æD     rcDBExec = -805,
  12570. æC 
  12571.  
  12572. æKY rcDBBadSessID
  12573. æFc DatabaseAccess.h
  12574. æT 
  12575. æD     rcDBBadSessID = -806,
  12576. æC 
  12577.  
  12578. æKY rcDBBadSessNum
  12579. æFc DatabaseAccess.h
  12580. æT 
  12581. æD     rcDBBadSessNum = -807, /* bad session number for DBGetConnInfo */
  12582. æC 
  12583.  
  12584. æKY rcDBBadDDEV
  12585. æFc DatabaseAccess.h
  12586. æT 
  12587. æD     rcDBBadDDEV = -808, /* bad ddev specified on DBInit */
  12588. æC 
  12589.  
  12590. æKY rcDBAsyncNotSupp
  12591. æFc DatabaseAccess.h
  12592. æT 
  12593. æD     rcDBAsyncNotSupp = -809, /* ddev does not support async calls */
  12594. æC 
  12595.  
  12596. æKY rcDBBadAsyncPB
  12597. æFc DatabaseAccess.h
  12598. æT 
  12599. æD     rcDBBadAsyncPB = -810, /* tried to kill a bad pb */
  12600. æC 
  12601.  
  12602. æKY rcDBNoHandler
  12603. æFc DatabaseAccess.h
  12604. æT 
  12605. æD     rcDBNoHandler = -811, /* no app handler for specified data type */
  12606. æC 
  12607.  
  12608. æKY rcDBWrongVersion
  12609. æFc DatabaseAccess.h
  12610. æT 
  12611. æD     rcDBWrongVersion = -812, /* incompatible versions */
  12612. æC 
  12613.  
  12614. æKY rcDBPackNotInited
  12615. æFc DatabaseAccess.h
  12616. æT 
  12617. æD     rcDBPackNotInited = -813, /* attempt to call other routine before InitDBPack */
  12618. æC 
  12619.  
  12620. æKY kDBUpdateWind
  12621. æFc DatabaseAccess.h
  12622. æT 
  12623. æD     kDBUpdateWind = 0,
  12624. æC 
  12625.  
  12626. æKY kDBAboutToInit
  12627. æFc DatabaseAccess.h
  12628. æT 
  12629. æD     kDBAboutToInit = 1,
  12630. æC 
  12631.  
  12632. æKY kDBInitComplete
  12633. æFc DatabaseAccess.h
  12634. æT 
  12635. æD     kDBInitComplete = 2,
  12636. æC 
  12637.  
  12638. æKY kDBSendComplete
  12639. æFc DatabaseAccess.h
  12640. æT 
  12641. æD     kDBSendComplete = 3,
  12642. æC 
  12643.  
  12644. æKY kDBExecComplete
  12645. æFc DatabaseAccess.h
  12646. æT 
  12647. æD     kDBExecComplete = 4,
  12648. æC 
  12649.  
  12650. æKY kDBStartQueryComplete
  12651. æFc DatabaseAccess.h
  12652. æT 
  12653. æD     kDBStartQueryComplete = 5,
  12654. æC 
  12655.  
  12656. æKY kDBGetItemComplete
  12657. æFc DatabaseAccess.h
  12658. æT 
  12659. æD     kDBGetItemComplete = 6,
  12660. æC 
  12661.  
  12662. æKY kDBGetQueryResultsComplete
  12663. æFc DatabaseAccess.h
  12664. æT 
  12665. æD     kDBGetQueryResultsComplete = 7,
  12666. æC 
  12667.  
  12668. æKY typeNone
  12669. æFc DatabaseAccess.h
  12670. æT #define
  12671. æD #define typeNone 'none'
  12672. æC 
  12673.  
  12674. æKY typeDate
  12675. æFc DatabaseAccess.h
  12676. æT #define
  12677. æD #define typeDate 'date'
  12678. æC 
  12679.  
  12680. æKY typeTime
  12681. æFc DatabaseAccess.h
  12682. æT #define
  12683. æD #define typeTime 'time'
  12684. æC 
  12685.  
  12686. æKY typeTimeStamp
  12687. æFc DatabaseAccess.h
  12688. æT #define
  12689. æD #define typeTimeStamp 'tims'
  12690. æC 
  12691.  
  12692. æKY typeDecimal
  12693. æFc DatabaseAccess.h
  12694. æT #define
  12695. æD #define typeDecimal 'deci'
  12696. æC 
  12697.  
  12698. æKY typeMoney
  12699. æFc DatabaseAccess.h
  12700. æT #define
  12701. æD #define typeMoney 'mone'
  12702. æC 
  12703.  
  12704. æKY typeVChar
  12705. æFc DatabaseAccess.h
  12706. æT #define
  12707. æD #define typeVChar 'vcha'
  12708. æC 
  12709.  
  12710. æKY typeVBin
  12711. æFc DatabaseAccess.h
  12712. æT #define
  12713. æD #define typeVBin 'vbin'
  12714. æC 
  12715.  
  12716. æKY typeLChar
  12717. æFc DatabaseAccess.h
  12718. æT #define
  12719. æD #define typeLChar 'lcha'
  12720. æC 
  12721.  
  12722. æKY typeLBin
  12723. æFc DatabaseAccess.h
  12724. æT #define
  12725. æD #define typeLBin 'lbin'
  12726. æC 
  12727.  
  12728. æKY typeDiscard
  12729. æFc DatabaseAccess.h
  12730. æT #define
  12731. æD #define typeDiscard 'disc'
  12732. æC 
  12733.  
  12734. æKY typeUnknown
  12735. æFc DatabaseAccess.h
  12736. æT #define
  12737. æD #define typeUnknown 'unkn'
  12738. æC 
  12739.  
  12740. æKY typeColBreak
  12741. æFc DatabaseAccess.h
  12742. æT #define
  12743. æD #define typeColBreak 'colb'
  12744. æC 
  12745.  
  12746. æKY typeRowBreak
  12747. æFc DatabaseAccess.h
  12748. æT #define
  12749. æD #define typeRowBreak 'rowb'
  12750. æC 
  12751.  
  12752. æKY typeAnyType
  12753. æFc DatabaseAccess.h
  12754. æT #define
  12755. æD #define typeAnyType (DBType)0
  12756. æC 
  12757.  
  12758. æKY kDBWaitForever
  12759. æFc DatabaseAccess.h
  12760. æT 
  12761. æD     kDBWaitForever = -1,
  12762. æC 
  12763.  
  12764. æKY kDBLastColFlag
  12765. æFc DatabaseAccess.h
  12766. æT 
  12767. æD     kDBLastColFlag = 0x0001,
  12768. æC 
  12769.  
  12770. æKY kDBNullFlag
  12771. æFc DatabaseAccess.h
  12772. æT 
  12773. æD     kDBNullFlag = 0x0004,
  12774. æC 
  12775.  
  12776. æKY DBType
  12777. æFc DatabaseAccess.h
  12778. æT typedef
  12779. æD typedef OSType DBType;
  12780. æC 
  12781.  
  12782. æKY DBAsyncParamBlockRec
  12783. DBAsyncParmBlkPtr
  12784. æFc DatabaseAccess.h
  12785. æT struct
  12786. æD struct DBAsyncParamBlockRec {
  12787.     ProcPtr completionProc; /* pointer to completion routine */
  12788.     OSErr result; /* result of call */
  12789.     long userRef; /* for application's use */
  12790.     long ddevRef; /* for ddev's use */
  12791.     long reserved; /* for internal use */
  12792. };
  12793.  
  12794. typedef struct DBAsyncParamBlockRec DBAsyncParamBlockRec;
  12795. typedef DBAsyncParamBlockRec *DBAsyncParmBlkPtr;
  12796. æC 
  12797.  
  12798. æKY ResListElem
  12799. ResListPtr
  12800. ResListHandle
  12801. æFc DatabaseAccess.h
  12802. æT struct
  12803. æD struct ResListElem {
  12804.     ResType theType; /* resource type */
  12805.     short id; /* resource id */
  12806. };
  12807.  
  12808. typedef struct ResListElem ResListElem;
  12809. typedef ResListElem *ResListPtr, **ResListHandle;
  12810. æC 
  12811.  
  12812. æKY QueryArray
  12813. QueryListPtr
  12814. QueryListHandle
  12815. æFc DatabaseAccess.h
  12816. æT struct
  12817. æD typedef Handle **QueryListHandle;
  12818. æC 
  12819.  
  12820. æKY QueryRecord
  12821. QueryPtr
  12822. QueryHandle
  12823. æFc DatabaseAccess.h
  12824. æT struct
  12825. æD struct QueryRecord {
  12826.     short version; /* version */
  12827.     short id; /* id of 'qrsc' this came from */
  12828.     Handle queryProc; /* handle to query def proc */
  12829.     Str63 ddevName; /* ddev name */
  12830.     Str255 host; /* host name */
  12831.     Str255 user; /* user name */
  12832.     Str255 password; /* password */
  12833.     Str255 connStr; /* connection string */
  12834.     short currQuery; /* index of current query */
  12835.     short numQueries; /* number of queries in list */
  12836.     QueryListHandle queryList; /* handle to array of handles to text */
  12837.     short numRes; /* number of resources in list */
  12838.     ResListHandle resList; /* handle to array of resource list elements */
  12839.     Handle dataHandle; /* for use by query def proc */
  12840.     long refCon; /* for use by application */
  12841. };
  12842.  
  12843. typedef struct QueryRecord QueryRecord;
  12844. typedef QueryRecord *QueryPtr, **QueryHandle;
  12845. æC 
  12846.  
  12847. æKY ColTypesArray
  12848. ColTypesPtr
  12849. ColTypesHandle
  12850. æFc DatabaseAccess.h
  12851. æT struct
  12852. æD typedef Handle ColTypesHandle;
  12853. æC 
  12854.  
  12855. æKY DBColInfoRecord
  12856. æFc DatabaseAccess.h
  12857. æT struct
  12858. æD struct DBColInfoRecord {
  12859.     short len;
  12860.     short places;
  12861.     short flags;
  12862. };
  12863.  
  12864. typedef struct DBColInfoRecord DBColInfoRecord;
  12865. æC 
  12866.  
  12867. æKY ColInfoArray
  12868. ColInfoPtr
  12869. ColInfoHandle
  12870. æFc DatabaseAccess.h
  12871. æT struct
  12872. æD typedef Handle ColInfoHandle;
  12873. æC 
  12874.  
  12875. æKY ResultsRecord
  12876. æFc DatabaseAccess.h
  12877. æT struct
  12878. æD struct ResultsRecord {
  12879.     short numRows; /* number of rows in result */
  12880.     short numCols; /* number of columns per row */
  12881.     ColTypesHandle colTypes; /* data type array */
  12882.     Handle colData; /* actual results */
  12883.     ColInfoHandle colInfo; /* DBColInfoRecord array */
  12884. };
  12885.  
  12886. typedef struct ResultsRecord ResultsRecord;
  12887. æC 
  12888.  
  12889. æKY InitDBPack
  12890. æFc DatabaseAccess.h
  12891. æT Function
  12892. æTN A82F
  12893. æD pascal OSErr InitDBPack(void)
  12894.     = {0x3F3C,0x0004,0x303C,0x0100,0xA82F}; 
  12895. æDT OSErr myVariable = InitDBPack()(void);
  12896. æC 
  12897.  
  12898. æKY DBInit
  12899. æFc DatabaseAccess.h
  12900. æT Function
  12901. æTN A82F
  12902. æD pascal OSErr DBInit(long *sessID,ConstStr63Param ddevName,ConstStr255Param host,
  12903.     ConstStr255Param user,ConstStr255Param passwd,ConstStr255Param connStr,
  12904.     DBAsyncParmBlkPtr asyncPB)
  12905.     = {0x303C,0x0E02,0xA82F}; 
  12906. æDT OSErr myVariable = DBInit((long *) sessID,(ConstStr63Param) ddevName,(ConstStr255Param) host,()
  12907.     ConstStr255Param user,(ConstStr255Param) passwd,(ConstStr255Param) connStr,()
  12908.     DBAsyncParmBlkPtr asyncPB);
  12909. æC 
  12910.  
  12911. æKY DBEnd
  12912. æFc DatabaseAccess.h
  12913. æT Function
  12914. æTN A82F
  12915. æD pascal OSErr DBEnd(long sessID,DBAsyncParmBlkPtr asyncPB)
  12916.     = {0x303C,0x0403,0xA82F}; 
  12917. æDT OSErr myVariable = DBEnd((long) sessID,(DBAsyncParmBlkPtr) asyncPB);
  12918. æC 
  12919.  
  12920. æKY DBGetConnInfo
  12921. æFc DatabaseAccess.h
  12922. æT Function
  12923. æTN A82F
  12924. æD pascal OSErr DBGetConnInfo(long sessID,short sessNum,long *returnedID,long *version,
  12925.     Str63 ddevName,Str255 host,Str255 user,Str255 network,Str255 connStr,long *start,
  12926.     OSErr *state,DBAsyncParmBlkPtr asyncPB)
  12927.     = {0x303C,0x1704,0xA82F}; 
  12928. æDT OSErr myVariable = DBGetConnInfo((long) sessID,(short) sessNum,(long *) returnedID,(long *) version,()
  12929.     Str63 ddevName,(Str255) host,(Str255) user,(Str255) network,(Str255) connStr,(long *) start,(
  12930.     OSErr) * state,(DBAsyncParmBlkPtr) asyncPB);
  12931. æC 
  12932.  
  12933. æKY DBGetSessionNum
  12934. æFc DatabaseAccess.h
  12935. æT Function
  12936. æTN A82F
  12937. æD pascal OSErr DBGetSessionNum(long sessID,short *sessNum,DBAsyncParmBlkPtr asyncPB)
  12938.     = {0x303C,0x0605,0xA82F}; 
  12939. æDT OSErr myVariable = DBGetSessionNum((long) sessID,(short *) sessNum,(DBAsyncParmBlkPtr) asyncPB);
  12940. æC 
  12941.  
  12942. æKY DBSend
  12943. æFc DatabaseAccess.h
  12944. æT Function
  12945. æTN A82F
  12946. æD pascal OSErr DBSend(long sessID,char *text,short len,DBAsyncParmBlkPtr asyncPB)
  12947.     = {0x303C,0x0706,0xA82F}; 
  12948. æDT OSErr myVariable = DBSend((long) sessID,(char *) text,(short) len,(DBAsyncParmBlkPtr) asyncPB);
  12949. æC 
  12950.  
  12951. æKY DBSendItem
  12952. æFc DatabaseAccess.h
  12953. æT Function
  12954. æTN A82F
  12955. æD pascal OSErr DBSendItem(long sessID,DBType dataType,short len,short places,
  12956.     short flags,void *buffer,DBAsyncParmBlkPtr asyncPB)
  12957.     = {0x303C,0x0B07,0xA82F}; 
  12958. æDT OSErr myVariable = DBSendItem((long) sessID,(DBType) dataType,(short) len,(short) places,()
  12959.     short flags,(void *) buffer,(DBAsyncParmBlkPtr) asyncPB);
  12960. æC 
  12961.  
  12962. æKY DBExec
  12963. æFc DatabaseAccess.h
  12964. æT Function
  12965. æTN A82F
  12966. æD pascal OSErr DBExec(long sessID,DBAsyncParmBlkPtr asyncPB)
  12967.     = {0x303C,0x0408,0xA82F}; 
  12968. æDT OSErr myVariable = DBExec((long) sessID,(DBAsyncParmBlkPtr) asyncPB);
  12969. æC 
  12970.  
  12971. æKY DBState
  12972. æFc DatabaseAccess.h
  12973. æT Function
  12974. æTN A82F
  12975. æD pascal OSErr DBState(long sessID,DBAsyncParmBlkPtr asyncPB)
  12976.     = {0x303C,0x0409,0xA82F}; 
  12977. æDT OSErr myVariable = DBState((long) sessID,(DBAsyncParmBlkPtr) asyncPB);
  12978. æC 
  12979.  
  12980. æKY DBGetErr
  12981. æFc DatabaseAccess.h
  12982. æT Function
  12983. æTN A82F
  12984. æD pascal OSErr DBGetErr(long sessID,long *err1,long *err2,Str255 item1,Str255 item2,
  12985.     Str255 errorMsg,DBAsyncParmBlkPtr asyncPB)
  12986.     = {0x303C,0x0E0A,0xA82F}; 
  12987. æDT OSErr myVariable = DBGetErr((long) sessID,(long *) err1,(long *) err2,(Str255) item1,(Str255) item2,()
  12988.     Str255 errorMsg,(DBAsyncParmBlkPtr) asyncPB);
  12989. æC 
  12990.  
  12991. æKY DBBreak
  12992. æFc DatabaseAccess.h
  12993. æT Function
  12994. æTN A82F
  12995. æD pascal OSErr DBBreak(long sessID,Boolean abort,DBAsyncParmBlkPtr asyncPB)
  12996.     = {0x303C,0x050B,0xA82F}; 
  12997. æDT OSErr myVariable = DBBreak((long) sessID,(Boolean) abort,(DBAsyncParmBlkPtr) asyncPB);
  12998. æC 
  12999.  
  13000. æKY DBGetItem
  13001. æFc DatabaseAccess.h
  13002. æT Function
  13003. æTN A82F
  13004. æD pascal OSErr DBGetItem(long sessID,long timeout,DBType *dataType,short *len,
  13005.     short *places,short *flags,void *buffer,DBAsyncParmBlkPtr asyncPB)
  13006.     = {0x303C,0x100C,0xA82F}; 
  13007. æDT OSErr myVariable = DBGetItem((long) sessID,(long) timeout,(DBType *) dataType,(short *) len,(
  13008.     short) * places,(short *) flags,(void *) buffer,(DBAsyncParmBlkPtr) asyncPB);
  13009. æC 
  13010.  
  13011. æKY DBUnGetItem
  13012. æFc DatabaseAccess.h
  13013. æT Function
  13014. æTN A82F
  13015. æD pascal OSErr DBUnGetItem(long sessID,DBAsyncParmBlkPtr asyncPB)
  13016.     = {0x303C,0x040D,0xA82F}; 
  13017. æDT OSErr myVariable = DBUnGetItem((long) sessID,(DBAsyncParmBlkPtr) asyncPB);
  13018. æC 
  13019.  
  13020. æKY DBKill
  13021. æFc DatabaseAccess.h
  13022. æT Function
  13023. æTN A82F
  13024. æD pascal OSErr DBKill(DBAsyncParmBlkPtr asyncPB)
  13025.     = {0x303C,0x020E,0xA82F}; 
  13026. æDT OSErr myVariable = DBKill((DBAsyncParmBlkPtr) asyncPB);
  13027. æC 
  13028.  
  13029. æKY DBGetNewQuery
  13030. æFc DatabaseAccess.h
  13031. æT Function
  13032. æTN A82F
  13033. æD pascal OSErr DBGetNewQuery(short queryID,QueryHandle *query)
  13034.     = {0x303C,0x030F,0xA82F}; 
  13035. æDT OSErr myVariable = DBGetNewQuery((short) queryID,(QueryHandle *) query);
  13036. æC 
  13037.  
  13038. æKY DBDisposeQuery
  13039. æFc DatabaseAccess.h
  13040. æT Function
  13041. æTN A82F
  13042. æD pascal OSErr DBDisposeQuery(QueryHandle query)
  13043.     = {0x303C,0x0210,0xA82F}; 
  13044. æDT OSErr myVariable = DBDisposeQuery((QueryHandle) query);
  13045. æC 
  13046.  
  13047. æKY DBStartQuery
  13048. æFc DatabaseAccess.h
  13049. æT Function
  13050. æTN A82F
  13051. æD pascal OSErr DBStartQuery(long *sessID,QueryHandle query,ProcPtr statusProc,
  13052.     DBAsyncParmBlkPtr asyncPB)
  13053.     = {0x303C,0x0811,0xA82F}; 
  13054. æDT OSErr myVariable = DBStartQuery((long *) sessID,(QueryHandle) query,(ProcPtr) statusProc,()
  13055.     DBAsyncParmBlkPtr asyncPB);
  13056. æC 
  13057.  
  13058. æKY DBGetQueryResults
  13059. æFc DatabaseAccess.h
  13060. æT Function
  13061. æTN A82F
  13062. æD pascal OSErr DBGetQueryResults(long sessID,ResultsRecord *results,long timeout,
  13063.     ProcPtr statusProc,DBAsyncParmBlkPtr asyncPB)
  13064.     = {0x303C,0x0A12,0xA82F}; 
  13065. æDT OSErr myVariable = DBGetQueryResults((long) sessID,(ResultsRecord *) results,(long) timeout,()
  13066.     ProcPtr statusProc,(DBAsyncParmBlkPtr) asyncPB);
  13067. æC 
  13068.  
  13069. æKY DBResultsToText
  13070. æFc DatabaseAccess.h
  13071. æT Function
  13072. æTN A82F
  13073. æD pascal OSErr DBResultsToText(ResultsRecord *results,Handle *theText)
  13074.     = {0x303C,0x0413,0xA82F}; 
  13075. æDT OSErr myVariable = DBResultsToText((ResultsRecord *) results,(Handle *) theText);
  13076. æC 
  13077.  
  13078. æKY DBInstallResultHandler
  13079. æFc DatabaseAccess.h
  13080. æT Function
  13081. æTN A82F
  13082. æD pascal OSErr DBInstallResultHandler(DBType dataType,ProcPtr theHandler,
  13083.     Boolean isSysHandler)
  13084.     = {0x303C,0x0514,0xA82F}; 
  13085. æDT OSErr myVariable = DBInstallResultHandler((DBType) dataType,(ProcPtr) theHandler,()
  13086.     Boolean isSysHandler);
  13087. æC 
  13088.  
  13089. æKY DBRemoveResultHandler
  13090. æFc DatabaseAccess.h
  13091. æT Function
  13092. æTN A82F
  13093. æD pascal OSErr DBRemoveResultHandler(DBType dataType)
  13094.     = {0x303C,0x0215,0xA82F}; 
  13095. æDT OSErr myVariable = DBRemoveResultHandler((DBType) dataType);
  13096. æC 
  13097.  
  13098. æKY DBGetResultHandler
  13099. æFc DatabaseAccess.h
  13100. æT Function
  13101. æTN A82F
  13102. æD pascal OSErr DBGetResultHandler(DBType dataType,ProcPtr *theHandler,Boolean getSysHandler)
  13103.     = {0x303C,0x0516,0xA82F}; 
  13104. æDT OSErr myVariable = DBGetResultHandler((DBType) dataType,(ProcPtr *) theHandler,(Boolean) getSysHandler);
  13105. æC 
  13106.  
  13107.  
  13108. æKY Desk.h
  13109. æKL CloseDeskAcc
  13110. opendeskacc
  13111. OpenDeskAcc
  13112. SystemClick
  13113. SystemEdit
  13114. SystemEvent
  13115. SystemMenu
  13116. SystemTask
  13117.  
  13118. accClear
  13119. accCopy
  13120. accCursor
  13121. accCut
  13122. accEvent
  13123. accMenu
  13124. accPaste
  13125. accRun
  13126. accUndo
  13127. goodbye
  13128.  
  13129. æKY accEvent
  13130. æFc Desk.h
  13131. æT 
  13132. æD     accEvent = 64,
  13133. æC 
  13134.  
  13135. æKY accRun
  13136. æFc Desk.h
  13137. æT 
  13138. æD     accRun = 65,
  13139. æC 
  13140.  
  13141. æKY accCursor
  13142. æFc Desk.h
  13143. æT 
  13144. æD     accCursor = 66,
  13145. æC 
  13146.  
  13147. æKY accMenu
  13148. æFc Desk.h
  13149. æT 
  13150. æD     accMenu = 67,
  13151. æC 
  13152.  
  13153. æKY accUndo
  13154. æFc Desk.h
  13155. æT 
  13156. æD     accUndo = 68,
  13157. æC 
  13158.  
  13159. æKY accCut
  13160. æFc Desk.h
  13161. æT 
  13162. æD     accCut = 70,
  13163. æC 
  13164.  
  13165. æKY accCopy
  13166. æFc Desk.h
  13167. æT 
  13168. æD     accCopy = 71,
  13169. æC 
  13170.  
  13171. æKY accPaste
  13172. æFc Desk.h
  13173. æT 
  13174. æD     accPaste = 72,
  13175. æC 
  13176.  
  13177. æKY accClear
  13178. æFc Desk.h
  13179. æT 
  13180. æD     accClear = 73,
  13181. æC 
  13182.  
  13183. æKY goodbye
  13184. æFc Desk.h
  13185. æT 
  13186. æD     goodbye = -1, /*goodbye message*/
  13187. æC 
  13188.  
  13189. æKY OpenDeskAcc
  13190. æFc Desk.h
  13191. æT Function
  13192. æTN A9B6
  13193. æD pascal short OpenDeskAcc(ConstStr255Param deskAccName)
  13194.     = 0xA9B6; 
  13195. æDT short myVariable = OpenDeskAcc((ConstStr255Param) deskAccName);
  13196. æMM
  13197. æRI I-440
  13198. æC 
  13199. OpenDeskAcc opens the desk accessory having the given name and displays its window
  13200. (if any) as the active window. The name is the accessory’s resource name, which you
  13201. get from the Apple menu by calling the Menu Manager procedure GetItem. OpenDeskAcc
  13202. calls the Resource Manager to read the desk accessory from the resource file into the
  13203. application heap.
  13204.  
  13205. You should ignore the value returned by OpenDeskAcc. If the desk accessory is successfully
  13206. opened, the function result is its driver reference number. However, if the desk
  13207. accessory can’t be opened, the function result is undefined; the accessory will have
  13208. taken care of informing the user of the problem (such as memory full) and won’t
  13209. display itself.
  13210.  
  13211. Warning:  Early versions of some desk accessories may set the current
  13212.           grafPort to the accessory’s port upon return from OpenDeskAcc.
  13213.           To be safe, you should bracket your call to OpenDeskAcc with
  13214.           calls to the QuickDraw procedures GetPort and SetPort, to save
  13215.           and restore the current port.
  13216.  
  13217. Note:  Programmers concerned about the amount of available memory should
  13218.        be aware that an open desk accessory uses from 1K to 3K bytes of
  13219.        heap space in addition to the space needed for the accessory itself.
  13220.        The desk accessory is responsible for determining whether there is
  13221.        sufficient memory for it to run; this can be done by calling
  13222.        SizeResource followed by ResrvMem.
  13223.  
  13224. æKY CloseDeskAcc
  13225. æFc Desk.h
  13226. æT Function
  13227. æTN A9B7
  13228. æD pascal void CloseDeskAcc(short refNum)
  13229.     = 0xA9B7; 
  13230. æDT CloseDeskAcc((short) refNum);
  13231. æRI I-440
  13232. æC 
  13233. When a system window is active and the user chooses Close from the File menu, call
  13234. CloseDeskAcc to close the desk accessory. RefNum is the driver reference number for
  13235. the desk accessory, which you get from the windowKind field of its window.
  13236.  
  13237. The Desk Manager automatically closes a desk accessory if the user clicks its close
  13238. box. Also, since the application heap is released when the application terminates,
  13239. every desk accessory goes away at that time.
  13240.  
  13241. æKY SystemClick
  13242. æFc Desk.h
  13243. æT Function
  13244. æTN A9B3
  13245. æD pascal void SystemClick(const EventRecord *theEvent,WindowPtr theWindow)
  13246.     = 0xA9B3; 
  13247. æDT SystemClick((const EventRecord *) theEvent,(WindowPtr) theWindow);
  13248. æMM
  13249. æRI I-441, P-35, 182
  13250. æC 
  13251. When a mouse-down event occurs and the Window Manager function FindWindow reports
  13252. that the mouse button was pressed in a system window, the application should call
  13253. SystemClick with the event record and the window pointer. If the given window belongs
  13254. to a desk accessory, SystemClick sees that the event gets handled properly.
  13255.  
  13256. SystemClick determines which part of the desk accessory’s window the mouse button was
  13257. pressed in, and responds accordingly (similar to the way your application responds to
  13258. mouse activities in its own windows).
  13259.  
  13260.   •  If the mouse button was pressed in the content region of the window
  13261.      and the window was active, SystemClick sends the mouse-down event to
  13262.      the desk accessory, which processes it as appropriate.
  13263.   •  If the mouse button was pressed in the content region and the window
  13264.      was inactive, SystemClick makes it the active window.
  13265.   •  If the mouse button was pressed in the drag region, SystemClick calls
  13266.      the Window Manager procedure DragWindow to pull an outline of the window
  13267.      across the screen and move the window to a new location. If the window
  13268.      was inactive, DragWindow also makes it the active window (unless the
  13269.      Command key was pressed along with the mouse button).
  13270.   •  If the mouse button was pressed in the go-away region, SystemClick calls
  13271.      the Window Manager function TrackGoAway to determine whether the mouse
  13272.      is still inside the go-away region when the click is completed:  If
  13273.      so, it tells the desk accessory to close itself; otherwise, it does
  13274.      nothing.
  13275.  
  13276. æKY SystemEdit
  13277. æFc Desk.h
  13278. æT Function
  13279. æTN A9C2
  13280. æD pascal Boolean SystemEdit(short editCmd)
  13281.     = 0xA9C2; 
  13282. æDT Boolean myVariable = SystemEdit((short) editCmd);
  13283. æMM
  13284. æRT 180, 215
  13285. æRI I-441
  13286. æC 
  13287. Assembly-language note:  The macro you invoke to call SystemEdit from
  13288.                          assembly language is named _SysEdit.
  13289.  
  13290. Call SystemEdit when there’s a mouse-down event in the menu bar and the user chooses
  13291. one of the five standard editing commands from the Edit menu. Pass one of the following
  13292. as the value of the editCmd parameter:
  13293.  
  13294.   editCmd    Editing command
  13295.  
  13296.     0            Undo
  13297.     2            Cut
  13298.     3            Copy
  13299.     4            Paste
  13300.     5            Clear
  13301.  
  13302. If your Edit menu contains these five commands in the standard arrangement (the order
  13303. listed above, with a dividing line between Undo and Cut), you can simply call
  13304.  
  13305.   SystemEdit(menuItem-1)
  13306.  
  13307. where menuItem is the menu item number.
  13308.  
  13309. If the active window doesn’t belong to a desk accessory, SystemEdit returns FALSE;
  13310. the application should then process the editing command as usual. If the active
  13311. window does belong to a desk accessory, SystemEdit asks that accessory to process the
  13312. command and returns TRUE; in this case, the application should ignore the command.
  13313.  
  13314. Note:  It’s up to the application to make sure desk accessories get
  13315.        their editing commands that are chosen from the Edit menu. In
  13316.        particular, make sure your application hasn’t disabled the Edit
  13317.        menu or any of the five standard commands when a desk accessory
  13318.        is activated.
  13319.  
  13320. æKY SystemTask
  13321. æFc Desk.h
  13322. æT Function
  13323. æTN A9B4
  13324. æD pascal void SystemTask(void)
  13325.     = 0xA9B4; 
  13326. æDT SystemTask()(void);
  13327. æRT 85
  13328. æRI I-442, 444, II-189, N85-1
  13329. æC 
  13330. For each open desk accessory (or other device driver performing periodic actions),
  13331. SystemTask causes the accessory to perform the periodic action defined for it, if any
  13332. such action has been defined and if the proper time period has passed since the
  13333. action was last performed. For example, a clock accessory can be defined such that
  13334. the second hand is to move once every second; the periodic action for the accessory
  13335. will be to move the second hand to the next position, and SystemTask will alert the
  13336. accessory every second to perform that action.
  13337.  
  13338. You should call SystemTask as often as possible, usually once every time through your
  13339. main event loop. Call it more than once if your application does an unusually large
  13340. amount of processing each time through the loop.
  13341.  
  13342. Note:  SystemTask should be called at least every sixtieth of a second.
  13343.  
  13344. æKY SystemEvent
  13345. æFc Desk.h
  13346. æT Function
  13347. æTN A9B2
  13348. æD pascal Boolean SystemEvent(const EventRecord *theEvent)
  13349.     = 0xA9B2; 
  13350. æDT Boolean myVariable = SystemEvent((const EventRecord *) theEvent);
  13351. æRT 5,85
  13352. æRI I-442, N5-1, N85-1
  13353. æC  
  13354. SystemEvent is called only by the Toolbox Event Manager function GetNextEvent when it
  13355. receives an event, to determine whether the event should be handled by the application
  13356. or by the system. If the given event should be handled by the application, SystemEvent
  13357. returns FALSE; otherwise, it calls the appropriate system code to handle the event
  13358. and returns TRUE.
  13359.  
  13360. In the case of a null or mouse-down event, SystemEvent does nothing but return FALSE.
  13361. Notice that it responds this way to a mouse-down event even though the event may in
  13362. fact have occurred in a system window (and therefore may have to be handled by the
  13363. system). The reason for this is that the check for exactly where the event occurred
  13364. (via the Window Manager function FindWindow) is made later by the application and so
  13365. would be made twice if SystemEvent were also to do it. To avoid this duplication,
  13366. SystemEvent passes the event on to the application and lets it make the sole call to
  13367. FindWindow. Should FindWindow reveal that the mouse-down event did occur in a system
  13368. window, the application can then call SystemClick, as described above, to get the
  13369. system to handle it.
  13370.  
  13371. If the given event is a mouse-up or any keyboard event (including keyboard equivalents
  13372. of commands), SystemEvent checks whether the active window belongs to a desk accessory
  13373. and whether that accessory can handle this type of event. If so, it sends the event
  13374. to the desk accessory and returns TRUE; otherwise, it returns FALSE.
  13375.  
  13376. If SystemEvent is passed an activate or update event, it checks whether the window
  13377. the event occurred in is a system window belonging to a desk accessory and whether
  13378. that accessory can handle this type of event. If so, it sends the event to the desk
  13379. accessory and returns TRUE; otherwise, it returns FALSE.
  13380.  
  13381. Note:  It’s unlikely that a desk accessory would not be set up to handle
  13382.        keyboard, activate, and update events, or that it would handle
  13383.        mouse-up events.
  13384.  
  13385.        If the given event is a disk-inserted event, SystemEvent does some
  13386.        low-level processing (by calling the File Manager function MountVol)
  13387.        but passes the event on to the application by returning FALSE, in
  13388.        case the application wants to do further processing. Finally,
  13389.        SystemEvent returns FALSE for network, device driver, and
  13390.        application-defined events.
  13391.  
  13392. Assembly-language note:  Advanced programmers can make SystemEvent
  13393.                          always return FALSE by setting the global
  13394.                          variable SEvtEnb (a byte) to 0.
  13395.  
  13396. æKY SystemMenu
  13397. æFc Desk.h
  13398. æT Function
  13399. æTN A9B5
  13400. æD pascal void SystemMenu(long menuResult)
  13401.     = 0xA9B5; 
  13402. æDT SystemMenu((long) menuResult);
  13403. æMM
  13404. æRI I-443
  13405. æC  
  13406. SystemMenu is called only by the Menu Manager functions MenuSelect and MenuKey, when
  13407. an item in a menu belonging to a desk accessory has been chosen. The menuResult
  13408. parameter has the same format as the value returned by MenuSelect and MenuKey:  the
  13409. menu ID in the high-order word and the menu item number in the low-order word. (The
  13410. menu ID will be negative.) SystemMenu directs the desk accessory to perform the
  13411. appropriate action for the given menu item.
  13412.  
  13413. æKY opendeskacc
  13414. æFc Desk.h
  13415. æT Function
  13416. æD short opendeskacc(char *deskAccName); 
  13417. æDT short myVariable = opendeskacc((char *) deskAccName);
  13418. æMM
  13419. æRI I-440
  13420. æC 
  13421. OpenDeskAcc opens the desk accessory having the given name and displays its window
  13422. (if any) as the active window. The name is the accessory’s resource name, which you
  13423. get from the Apple menu by calling the Menu Manager procedure GetItem. OpenDeskAcc
  13424. calls the Resource Manager to read the desk accessory from the resource file into the
  13425. application heap.
  13426.  
  13427. You should ignore the value returned by OpenDeskAcc. If the desk accessory is successfully
  13428. opened, the function result is its driver reference number. However, if the desk
  13429. accessory can’t be opened, the function result is undefined; the accessory will have
  13430. taken care of informing the user of the problem (such as memory full) and won’t
  13431. display itself.
  13432.  
  13433. Warning:  Early versions of some desk accessories may set the current
  13434.           grafPort to the accessory’s port upon return from OpenDeskAcc.
  13435.           To be safe, you should bracket your call to OpenDeskAcc with
  13436.           calls to the QuickDraw procedures GetPort and SetPort, to save
  13437.           and restore the current port.
  13438.  
  13439. Note:  Programmers concerned about the amount of available memory should
  13440.        be aware that an open desk accessory uses from 1K to 3K bytes of
  13441.        heap space in addition to the space needed for the accessory itself.
  13442.        The desk accessory is responsible for determining whether there is
  13443.        sufficient memory for it to run; this can be done by calling
  13444.        SizeResource followed by ResrvMem.
  13445.  
  13446.  
  13447. æKY DeskBus.h
  13448. æKL ADBOp
  13449. ADBReInit
  13450. CountADBs
  13451. GetADBInfo
  13452. GetIndADB
  13453. SetADBInfo
  13454.  
  13455. ADBAddress
  13456. ADBDataBlock
  13457. ADBDBlkPtr
  13458. ADBOpBlock
  13459. ADBOpBPtr
  13460. ADBSetInfoBlock
  13461. ADBSInfoPtr
  13462.  
  13463. æKY ADBAddress
  13464. æFc DeskBus.h
  13465. æT typedef
  13466. æD typedef char ADBAddress;
  13467. æC 
  13468.  
  13469. æKY ADBOpBlock
  13470. ADBOpBPtr
  13471. æFc DeskBus.h
  13472. æT struct
  13473. æD struct ADBOpBlock {
  13474.     Ptr dataBuffPtr; /*address of data buffer*/
  13475.     Ptr opServiceRtPtr; /*service routine pointer*/
  13476.     Ptr opDataAreaPtr; /*optional data area address*/
  13477. };
  13478.  
  13479. typedef struct ADBOpBlock ADBOpBlock;
  13480. typedef ADBOpBlock *ADBOpBPtr;
  13481. æC 
  13482.  
  13483. æKY ADBDataBlock
  13484. ADBDBlkPtr
  13485. æFc DeskBus.h
  13486. æT struct
  13487. æD struct ADBDataBlock {
  13488.     char devType; /*device type*/
  13489.     char origADBAddr; /*original ADB Address*/
  13490.     Ptr dbServiceRtPtr; /*service routine pointer*/
  13491.     Ptr dbDataAreaAddr; /*data area address*/
  13492. };
  13493.  
  13494. typedef struct ADBDataBlock ADBDataBlock;
  13495. typedef ADBDataBlock *ADBDBlkPtr;
  13496. æC 
  13497.  
  13498. æKY ADBSetInfoBlock
  13499. ADBSInfoPtr
  13500. æFc DeskBus.h
  13501. æT struct
  13502. æD struct ADBSetInfoBlock {
  13503.     Ptr siServiceRtPtr; /*service routine pointer*/
  13504.     Ptr siDataAreaAddr; /*data area address*/
  13505. };
  13506.  
  13507. typedef struct ADBSetInfoBlock ADBSetInfoBlock;
  13508. typedef ADBSetInfoBlock *ADBSInfoPtr;
  13509. æC 
  13510.  
  13511. æKY ADBReInit
  13512. æFc DeskBus.h
  13513. æT Function
  13514. æTN A07B
  13515. æD pascal void ADBReInit(void)
  13516.     = 0xA07B; 
  13517. æDT ADBReInit()(void);
  13518. æMM
  13519. æRT 143, 206 
  13520. æRI V-367, N143
  13521. æC 
  13522. Trap macro    _ADBReInit
  13523.  
  13524. ADBReInit reinitializes the entire Apple Desktop Bus. It clears the ADB device table
  13525. to zeros and places a SendReset command on the bus to reset all devices to their
  13526. original addresses. ADBReInit has no parameters.
  13527.  
  13528. Because it does not deallocate ADB resources on the system heap, ADBReInit should not
  13529. be used for routine bus initialization. Apple strongly recommends against adding
  13530. devices while the system is running; therefore, you should never call ADBReInit.
  13531.  
  13532. ADBReInit also calls a routine pointed to by the low memory global JADBProc
  13533. at the beginning and end of its execution.  You can insert your own
  13534. preprocessing/postprocessing routine by changing the value of JADBProc; ADBReInit
  13535. conditions it by setting D0 to 0 for preprocessing and to 1 for postprocessing.  Your
  13536. procedure must restore the value of D0 and branch to the original value of JADBProc
  13537. on exit.  JADBProc should be used to de-allocate memory used by the driver (see
  13538. MacDTS Sample Code “TbltDrvr” for an example), and then it should chain to the procedure
  13539. originally found in JADBProc.
  13540.  
  13541. The complete ADBReInit sequence is therefore the following:
  13542.  
  13543.   •  JSR to JADBProc with D0 set to 0
  13544.   •  reinitialize the Apple Desktop Bus
  13545.   •  clear the ADB device table
  13546.   •  JSR to JADBProc with D0 set to 1
  13547.  
  13548. æKY ADBOp
  13549. æFc DeskBus.h
  13550. æT Function
  13551. æD pascal OSErr ADBOp(Ptr data,ProcPtr compRout,Ptr buffer,short commandNum); 
  13552. æDT OSErr myVariable = ADBOp((Ptr) data,(ProcPtr) compRout,(Ptr) buffer,(short) commandNum);
  13553. æRT 206
  13554. æRI V-368
  13555. æC 
  13556. Trap macro    _ADBOp
  13557.  
  13558. On entry:    A0:  pointer to parameter block
  13559.              D0:  commandNum (byte)
  13560.  
  13561. Parameter block
  13562.     -->    0    buffer      pointer
  13563.     -->    4    compRout    pointer
  13564.     -->    8    data        pointer
  13565.  
  13566. On exit:     D0:  result code (byte)
  13567.  
  13568. The completion routine pointed to by compRout will be passed the following parameters
  13569. on entry:
  13570.  
  13571.              D0:  commandNum (byte)
  13572.              A0:  pointer to buffer, data stored as a Pascal string (maximum
  13573.                   8 bytes data preceded by one length byte)
  13574.              A1:  pointer to completion routine (compRout)
  13575.              A2:  pointer to optional data area (data)
  13576.  
  13577. ADBOp transmits over the bus the command byte whose value is given by commandNum. The
  13578. structure of the command byte is given earlier in Figure 1. ADBOp executes only when
  13579. the ADB is otherwise idle; otherwise it is held in a command queue. It returns an
  13580. error if the command queue is full. The length of the data buffer pointed to by
  13581. buffer is contained in its first byte, like a Pascal string. The optional data area
  13582. pointed to by data is for local storage by the completion routine pointed to by
  13583. compRout. ADBop should be used sparingly; it is not intended for polling a device. 
  13584. The host automatically polls devices with data to deliver.
  13585.  
  13586. Result codes    noErr    No error
  13587.                 –1       Unsuccessful completion
  13588.  
  13589. æKY CountADBs
  13590. æFc DeskBus.h
  13591. æT Function
  13592. æTN A077
  13593. æD #pragma parameter __D0 CountADBs
  13594. pascal short CountADBs(void)
  13595.     = 0xA077; 
  13596. æDT #pragma parameter __D0 CountADBs
  13597. pascal short myVariable = CountADBs()(void);
  13598. æRT 206
  13599. æRI V-369
  13600. æC 
  13601. Trap macro    _CountADBs
  13602.  
  13603. On exit:    D0:  number of devices (byte)
  13604.  
  13605. CountADBs returns a value representing the number of devices connected to the ADB by
  13606. counting the number of entries in the device table. It has no arguments and returns
  13607. no error codes.
  13608.  
  13609. æKY GetIndADB
  13610. æFc DeskBus.h
  13611. æT Function
  13612. æTN A078
  13613. æD #pragma parameter __D0 GetIndADB(__A0,__D0)
  13614. pascal ADBAddress GetIndADB(ADBDataBlock *info,short devTableIndex)
  13615.     = 0xA078; 
  13616. æDT #pragma parameter __D0 myVariable = GetIndADB()(__A0,)(__D0);
  13617. æRT 206
  13618. æRI V-369
  13619. æC 
  13620. Trap macro    _GetIndADB
  13621.  
  13622. On entry:    A0:  pointer to parameter block
  13623.              D0:  entry index number; range = 1..CountADBs (byte)
  13624.  
  13625. Parameter block
  13626.     <--    0    device type                byte    (handler ID)
  13627.     <--    1    original ADB address       byte
  13628.     <--    2    service routine address    pointer (compRout)
  13629.     <--    6    data area address          pointer (data)
  13630.  
  13631. On exit:     D0:  positive value:  current ADB address (byte)
  13632.                   negative value:  error code (byte)
  13633.  
  13634. GetIndADB returns information from the ADB device table entry whose index number is
  13635. given by devTableIndex. ADBDataBlock has this form:
  13636.  
  13637. TYPE  ADBDataBlock =
  13638.              PACKED RECORD
  13639.                devType:         SignedByte; {device type (handler ID)}
  13640.                origADBAddr:     SignedByte; {original ADB address}
  13641.                dbServiceRtPtr:  Ptr;        {service routine address (compRout)}
  13642.                dbDataAreaAddr:  Ptr         {data area address (data)}
  13643.              END;
  13644.  
  13645. GetIndADB returns the current ADB address of the device. If it is unable to complete
  13646. execution successfully, GetIndADB returns a negative value.
  13647.  
  13648. æKY GetADBInfo
  13649. æFc DeskBus.h
  13650. æT Function
  13651. æTN A079
  13652. æD #pragma parameter __D0 GetADBInfo(__A0,__D0)
  13653. pascal OSErr GetADBInfo(ADBDataBlock *info,ADBAddress adbAddr)
  13654.     = 0xA079; 
  13655. æDT #pragma parameter __D0 myVariable = GetADBInfo()(__A0,)(__D0);
  13656. æRI V-370
  13657. æC 
  13658. Trap macro    _GetADBInfo
  13659.  
  13660. On entry:    A0:  pointer to parameter block
  13661.              D0:  ADB address of the device (byte)
  13662.  
  13663. Parameter block
  13664.     <--    0    device handler ID          byte
  13665.     <--    1    original ADB address       byte
  13666.     <--    2    service routine address    pointer (compRout)
  13667.     <--    6    data area address          pointer (data)
  13668.  
  13669. On exit:     D0:  result code (byte)
  13670.  
  13671. GetADBInfo returns information from the ADB device table entry of the device whose
  13672. ADB address is given by ABDAddr. The structure of ADBDataBlock is given above under
  13673. “GetIndADB”.
  13674.  
  13675. Result codes    noErr    No error
  13676.  
  13677. æKY SetADBInfo
  13678. æFc DeskBus.h
  13679. æT Function
  13680. æTN A07A
  13681. æD #pragma parameter __D0 SetADBInfo(__A0,__D0)
  13682. pascal OSErr SetADBInfo(ADBSetInfoBlock *info,ADBAddress adbAddr)
  13683.     = 0xA07A; 
  13684. æDT #pragma parameter __D0 myVariable = SetADBInfo()(__A0,)(__D0);
  13685. æRT 206
  13686. æRI V-370
  13687. æC 
  13688. Trap macro    _SetADBInfo
  13689.  
  13690. On entry:    A0:  pointer to parameter block
  13691.              D0:  ADB address of the device (byte)
  13692.  
  13693. Parameter block
  13694.     -->    0    service routine address    pointer (compRout)
  13695.     -->    4    data area address          pointer (data)
  13696.  
  13697. On exit:     D0:  result code (byte)
  13698.  
  13699. SetADBInfo sets the service routine address and the data area address in the ADB
  13700. device table entry for the device whose ADB address is given by ABDAddr. ADBSetInfoBlock
  13701. has this form:
  13702.  
  13703. TYPE  ADBSetInfoBlock =
  13704.                RECORD
  13705.                  siServiceRtPtr:  Ptr;  {service routine address (compRout)}
  13706.                  siDataAreaAddr:  Ptr   {data area address (data)}
  13707.                END;
  13708.  
  13709. Result codes    noErr    No error
  13710.  
  13711. Warning:  You should send a Flush command to the device after calling it
  13712.           with SetADBInfo, to prevent it sending old data to the new data
  13713.           area address.
  13714.  
  13715.  
  13716. æKY Devices.h
  13717. æKL CloseDriver
  13718. Control
  13719. GetDCtlEntry
  13720. KillIO
  13721. opendriver
  13722. OpenDriver
  13723. PBControl
  13724. PBControlAsync
  13725. PBControlSync
  13726. PBKillIO
  13727. PBKillIOAsync
  13728. PBKillIOSync
  13729. PBStatus
  13730. PBStatusAsync
  13731. PBStatusSync
  13732. SetChooserAlert
  13733. Status
  13734.  
  13735. activateMsg
  13736. activDev
  13737. AuxDCE
  13738. AuxDCEHandle
  13739. AuxDCEPtr
  13740. buttonMsg
  13741. cancelMsg
  13742. cdevGenErr
  13743. cdevMemErr
  13744. cdevResErr
  13745. cdevUnset
  13746. chooserID
  13747. clearDev
  13748. closeDev
  13749. copyDev
  13750. cursorDev
  13751. cutDev
  13752. DCtlEntry
  13753. DCtlHandle
  13754. DCtlPtr
  13755. deactivateMsg
  13756. deactivDev
  13757. deselectMsg
  13758. fillListMsg
  13759. getSelMsg
  13760. hitDev
  13761. hitMsg
  13762. initDev
  13763. initMsg
  13764. keyEvtDev
  13765. keyEvtMsg
  13766. macDev
  13767. newSelMsg
  13768. normalMsg
  13769. nulDev
  13770. nulMsg
  13771. okMsg
  13772. pasteDev
  13773. selectMsg
  13774. startupMsg
  13775. superMsg
  13776. terminateMsg
  13777. undoDev
  13778. updateDev
  13779. updateMsg
  13780.  
  13781. æKY newSelMsg
  13782. æFc Devices.h
  13783. æT 
  13784. æD     newSelMsg = 12,
  13785. æC 
  13786.  
  13787. æKY fillListMsg
  13788. æFc Devices.h
  13789. æT 
  13790. æD     fillListMsg = 13,
  13791. æC 
  13792.  
  13793. æKY getSelMsg
  13794. æFc Devices.h
  13795. æT 
  13796. æD     getSelMsg = 14,
  13797. æC 
  13798.  
  13799. æKY selectMsg
  13800. æFc Devices.h
  13801. æT 
  13802. æD     selectMsg = 15,
  13803. æC 
  13804.  
  13805. æKY deselectMsg
  13806. æFc Devices.h
  13807. æT 
  13808. æD     deselectMsg = 16,
  13809. æC 
  13810.  
  13811. æKY terminateMsg
  13812. æFc Devices.h
  13813. æT 
  13814. æD     terminateMsg = 17,
  13815. æC 
  13816.  
  13817. æKY buttonMsg
  13818. æFc Devices.h
  13819. æT 
  13820. æD     buttonMsg = 19,
  13821. æC 
  13822.  
  13823. æKY chooserID
  13824. æFc Devices.h
  13825. æT 
  13826. æD     chooserID = 1,
  13827. æC 
  13828.  
  13829. æKY initDev
  13830. æFc Devices.h
  13831. æT 
  13832. æD     initDev = 0, /*Time for cdev to initialize itself*/
  13833. æC 
  13834. »The initDev Message
  13835.  
  13836. InitDev is an initialization message sent to allow the cdev to allocate its private
  13837. storage (if any) and do any initial settings to buttons or controls.  This message is
  13838. sent when the user clicks on the cdev’s icon.
  13839.  
  13840. Note that the dialog, cdev list, and all of the items in the cdev’s 'DITL' except
  13841. user items will already have been drawn when the initDev message is sent.
  13842.  
  13843. If your cdev doesn’t need any storage it should return the value that was passed to
  13844. it in cdevValue.
  13845.  
  13846. æKY hitDev
  13847. æFc Devices.h
  13848. æT 
  13849. æD     hitDev = 1, /*Hit on one of my items*/
  13850. æC »The hitDev Message
  13851.  
  13852. A hitDev message is sent when the user has clicked an enabled dialog item that belongs
  13853. to the cdev.  The dialog item number of the item hit is passed in the Item parameter.
  13854.  Remember that the Control Panel’s items precede yours, so
  13855. you’ll want (Item – numItems) to determine which of your items was hit.  If the
  13856. Control Panel itself has n items, the first of the cdev’s items will be n+1 in the
  13857. combined dialog item list.  A cdev should not depend on any hardcoded value for
  13858. numItems, since the number of items in Control Panel’s 'DITL' is likely to change in
  13859. the future.
  13860.  
  13861. Factoring in numItems need not mean an increase in your code size, or passing and
  13862. adding numItems everywhere, or foregoing the constants that most developers use to
  13863. identify specific items.  You can do it easily, and neatly, as follows:
  13864.  
  13865.   1.  Subtract numItems from Item right away, and refer to your dialog
  13866.       items with constants as usual throughout the cdev.
  13867.   2.  Write simple envelope routines to enclose Dialog Manager procedures
  13868.       that require item number arguments.  Add numItems only locally,
  13869.       within those routines and for the Dialog Manager calls only.
  13870.  
  13871. This is demonstrated in the sample cdev.
  13872.  
  13873. æKY closeDev
  13874. æFc Devices.h
  13875. æT 
  13876. æD     closeDev = 2, /*Close yourself*/
  13877. æC 
  13878.  
  13879. æKY nulDev
  13880. æFc Devices.h
  13881. æT 
  13882. æD     nulDev = 3, /*Null event*/
  13883. æC »The nulDev Message
  13884.  
  13885. A nulDev message is sent to the cdev on every Control Panel run event.  This allows
  13886. the cdev to perform tasks that need to be executed continuously
  13887. (insertion point blinking, for example).
  13888.  
  13889. A cdev cannot assume any particular timing of calls from applications.  Don’t use
  13890. nulDev to refresh settings; see activDev, above.
  13891.  
  13892. æKY updateDev
  13893. æFc Devices.h
  13894. æT 
  13895. æD     updateDev = 4, /*Update event*/
  13896. æC 
  13897.  
  13898. æKY activDev
  13899. æFc Devices.h
  13900. æT 
  13901. æD     activDev = 5, /*Activate event*/
  13902. æC 
  13903. #define activDev 5 /*Activate event*/
  13904.  
  13905. »The activDev Message
  13906.  
  13907. An activDev message is sent to the cdev on every activate event.  It allows the cdev
  13908. to reset any items that may have changed while the Control Panel was inactive.   It
  13909. also allows the cdev to send things such as “lists activate” messages.
  13910.  
  13911. æKY deactivDev
  13912. æFc Devices.h
  13913. æT 
  13914. æD     deactivDev = 6, /*Deactivate event*/
  13915. æC 
  13916.  
  13917. æKY keyEvtDev
  13918. æFc Devices.h
  13919. æT 
  13920. æD     keyEvtDev = 7, /*Key down/auto key*/
  13921. æC »The keyEvtDev Message
  13922.  
  13923. A keyEvtDev message is sent to the cdev on every keyDown event and autoKey event.  It
  13924. allows the cdev to process key events.  On return to the Control Panel, the key event
  13925. will be processed by a call to dialogSelect in the Dialog Manager.  A cdev that does
  13926. not want the Toolbox Event Manager to do any further processing should change the
  13927. what field of the EventRecord to nullEvent before returning to the Control Panel.
  13928.  
  13929. æKY macDev
  13930. æFc Devices.h
  13931. æT 
  13932. æD     macDev = 8, /*Decide whether or not to show up*/
  13933. æC 
  13934.  
  13935. »The macDev Message
  13936.  
  13937. If the 'mach' resource has a 0 in Softmask and a –1 ($FFFF) in Hardmask, the first
  13938. message a cdev will get is a macDev message.  This is an opportunity for the cdev to
  13939. determine whether it can run, and whether it should appear in the Control Panel’s
  13940. cdev list.  The cdev can do its own check to see which machine it is being run on,
  13941. what hardware is connected, and what is in the slots (if it has slots).  The cdev
  13942. must then return a function result of 1 or 0.  If  a 0 is returned, the Control Panel
  13943. will not display the cdev in the icon list.  (Note that the Control Panel does not
  13944. interpret this 0 or 1 as an error message as described under “Cdev Error Checking”.)
  13945.  
  13946. The macDev call happens only once, and only when Softmask and Hardmask are 0 and
  13947. FFFF.  It is always the first call made to the cdev.
  13948. #define macDev   8 /*Decide whether or not to show up*/
  13949.  
  13950. æKY undoDev
  13951. æFc Devices.h
  13952. æT 
  13953. æD     undoDev = 9,
  13954. æC 
  13955.  
  13956. æKY cutDev
  13957. æFc Devices.h
  13958. æT 
  13959. æD     cutDev = 10,
  13960. æC 
  13961.  
  13962. æKY copyDev
  13963. æFc Devices.h
  13964. æT 
  13965. æD     copyDev = 11,
  13966. æC 
  13967.  
  13968. æKY pasteDev
  13969. æFc Devices.h
  13970. æT 
  13971. æD     pasteDev = 12,
  13972. æC 
  13973.  
  13974. æKY clearDev
  13975. æFc Devices.h
  13976. æT 
  13977. æD     clearDev = 13,
  13978. æC 
  13979.  
  13980. æKY cursorDev
  13981. æFc Devices.h
  13982. æT 
  13983. æD     cursorDev = 14,
  13984. æC 
  13985.  
  13986. æKY cdevGenErr
  13987. æFc Devices.h
  13988. æT 
  13989. æD     cdevGenErr = -1, /*General error; gray cdev w/o alert*/
  13990. æC 
  13991.  
  13992. æKY cdevMemErr
  13993. æFc Devices.h
  13994. æT 
  13995. æD     cdevMemErr = 0, /*Memory shortfall; alert user please*/
  13996. æC 
  13997.  
  13998. æKY cdevResErr
  13999. æFc Devices.h
  14000. æT 
  14001. æD     cdevResErr = 1, /*Couldn't get a needed resource; alert*/
  14002. æC 
  14003.  
  14004. æKY cdevUnset
  14005. æFc Devices.h
  14006. æT 
  14007. æD     cdevUnset = 3, /* cdevValue is initialized to this*/
  14008. æC 
  14009. »CDEV ERROR CHECKING
  14010. _______________________________________________________________________________
  14011.  
  14012. Because a desk accessory may be called into many strange and wonderful situations,
  14013. careful attention must be paid to error checking.  The two most common error conditions
  14014. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14015. have been provided in the Control Panel to help with errors encountered in a cdev.
  14016.  
  14017. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14018. must be able to detect and recover from error conditions on its own.  If the recovery
  14019. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14020. back to the Control Panel with an error code.
  14021.  
  14022. Following a shutdown, the Control Panel can help report the error condition to the
  14023. user and prevent accidental reentry into the cdev that might result from such things
  14024. as an update event.  A cdev can request three different error reporting mechanisms
  14025. from the Control Panel:
  14026.  
  14027.   •  If a memory error has occured, then, after the cdev has safely shut
  14028.      itself down, it may request the Control Panel to issue an out-of-memory
  14029.      error message and gray out (paint over with the background pattern) the
  14030.      cdev area of the Control Panel window.  It will remain grayed until
  14031.      another cdev is selected.  The Control Panel window itself is not
  14032.      closed since other cdevs may still be able to function in the environment.
  14033.   •  If a resource error is detected, the cdev may request that a
  14034.      can’t-find-needed-resource error message be issued.
  14035.   •  The cdev may display its own error message and then call on the
  14036.      Control Panel to gray its area.
  14037.  
  14038. The Control Panel uses the cdevValue parameter to send status information to the
  14039. cdev, and a proper cdev uses its function value to send information back to the
  14040. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14041. Control Panel puts the last function value it received into cdevValue when it calls
  14042. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14043. may want to keep a handle to its own storage, in which case passing it as the function
  14044. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14045. at the next call.
  14046.  
  14047. Four constants have been defined for this cdev/Control Panel communication:
  14048.  
  14049. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14050. #define  cdevGenErr      -1    /*generic cdev error*/
  14051. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14052. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14053.  
  14054. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14055. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14056. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14057. and pointers it has set up, strip the stack back to the same position as a normal
  14058. exit, and return one of the three error codes as the function result.  The Control
  14059. Panel will respond as follows:
  14060.  
  14061.   Function           Message to                     Control Panel Action    
  14062.   Result             Control Panel   
  14063.  
  14064.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14065.                      error from which it cannot     send a 0 in cdevValue in
  14066.                      recover, but do not put up     succeeding cdev calls
  14067.                      an error dialog.
  14068.  
  14069.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14070.                      there is not enough memory to  up error dialog, send a 0
  14071.                      execute; please put up a       in cdevValue in succeeding
  14072.                      memory error dialog.           cdev calls.
  14073.  
  14074.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14075.                      resource; please put up a      up error dialog, send a 0
  14076.                      resource error dialog.         in cdevValue in succeeding
  14077.                                                     cdev calls.
  14078.  
  14079.   all other values,  No error conditions.           Send the value back in
  14080.   either handles                                    cdevValue.
  14081.   or cdevUnset
  14082.  
  14083. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14084. responded to a cdev error message by shutting down the cdev and displaying an error
  14085. dialog if one was requested.  The cdev should immediately exit.
  14086.  
  14087. Once the Control Panel has responded to an error message from a cdev it will no
  14088. longer respond to any return values until another cdev is launched.
  14089.  
  14090. æKY initMsg
  14091. æFc Devices.h
  14092. æT 
  14093. æD     initMsg = 1, /*initialization*/
  14094. æC 
  14095. »CDEV ERROR CHECKING
  14096. _______________________________________________________________________________
  14097.  
  14098. Because a desk accessory may be called into many strange and wonderful situations,
  14099. careful attention must be paid to error checking.  The two most common error conditions
  14100. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14101. have been provided in the Control Panel to help with errors encountered in a cdev.
  14102.  
  14103. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14104. must be able to detect and recover from error conditions on its own.  If the recovery
  14105. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14106. back to the Control Panel with an error code.
  14107.  
  14108. Following a shutdown, the Control Panel can help report the error condition to the
  14109. user and prevent accidental reentry into the cdev that might result from such things
  14110. as an update event.  A cdev can request three different error reporting mechanisms
  14111. from the Control Panel:
  14112.  
  14113.   •  If a memory error has occured, then, after the cdev has safely shut
  14114.      itself down, it may request the Control Panel to issue an out-of-memory
  14115.      error message and gray out (paint over with the background pattern) the
  14116.      cdev area of the Control Panel window.  It will remain grayed until
  14117.      another cdev is selected.  The Control Panel window itself is not
  14118.      closed since other cdevs may still be able to function in the environment.
  14119.   •  If a resource error is detected, the cdev may request that a
  14120.      can’t-find-needed-resource error message be issued.
  14121.   •  The cdev may display its own error message and then call on the
  14122.      Control Panel to gray its area.
  14123.  
  14124. The Control Panel uses the cdevValue parameter to send status information to the
  14125. cdev, and a proper cdev uses its function value to send information back to the
  14126. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14127. Control Panel puts the last function value it received into cdevValue when it calls
  14128. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14129. may want to keep a handle to its own storage, in which case passing it as the function
  14130. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14131. at the next call.
  14132.  
  14133. Four constants have been defined for this cdev/Control Panel communication:
  14134.  
  14135. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14136. #define  cdevGenErr      -1    /*generic cdev error*/
  14137. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14138. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14139.  
  14140. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14141. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14142. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14143. and pointers it has set up, strip the stack back to the same position as a normal
  14144. exit, and return one of the three error codes as the function result.  The Control
  14145. Panel will respond as follows:
  14146.  
  14147.   Function           Message to                     Control Panel Action    
  14148.   Result             Control Panel   
  14149.  
  14150.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14151.                      error from which it cannot     send a 0 in cdevValue in
  14152.                      recover, but do not put up     succeeding cdev calls
  14153.                      an error dialog.
  14154.  
  14155.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14156.                      there is not enough memory to  up error dialog, send a 0
  14157.                      execute; please put up a       in cdevValue in succeeding
  14158.                      memory error dialog.           cdev calls.
  14159.  
  14160.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14161.                      resource; please put up a      up error dialog, send a 0
  14162.                      resource error dialog.         in cdevValue in succeeding
  14163.                                                     cdev calls.
  14164.  
  14165.   all other values,  No error conditions.           Send the value back in
  14166.   either handles                                    cdevValue.
  14167.   or cdevUnset
  14168.  
  14169. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14170. responded to a cdev error message by shutting down the cdev and displaying an error
  14171. dialog if one was requested.  The cdev should immediately exit.
  14172.  
  14173. Once the Control Panel has responded to an error message from a cdev it will no
  14174. longer respond to any return values until another cdev is launched.
  14175.  
  14176. æKY okMsg
  14177. æFc Devices.h
  14178. æT 
  14179. æD     okMsg = 2, /*user clicked OK button*/
  14180. æC 
  14181. »CDEV ERROR CHECKING
  14182. _______________________________________________________________________________
  14183.  
  14184. Because a desk accessory may be called into many strange and wonderful situations,
  14185. careful attention must be paid to error checking.  The two most common error conditions
  14186. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14187. have been provided in the Control Panel to help with errors encountered in a cdev.
  14188.  
  14189. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14190. must be able to detect and recover from error conditions on its own.  If the recovery
  14191. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14192. back to the Control Panel with an error code.
  14193.  
  14194. Following a shutdown, the Control Panel can help report the error condition to the
  14195. user and prevent accidental reentry into the cdev that might result from such things
  14196. as an update event.  A cdev can request three different error reporting mechanisms
  14197. from the Control Panel:
  14198.  
  14199.   •  If a memory error has occured, then, after the cdev has safely shut
  14200.      itself down, it may request the Control Panel to issue an out-of-memory
  14201.      error message and gray out (paint over with the background pattern) the
  14202.      cdev area of the Control Panel window.  It will remain grayed until
  14203.      another cdev is selected.  The Control Panel window itself is not
  14204.      closed since other cdevs may still be able to function in the environment.
  14205.   •  If a resource error is detected, the cdev may request that a
  14206.      can’t-find-needed-resource error message be issued.
  14207.   •  The cdev may display its own error message and then call on the
  14208.      Control Panel to gray its area.
  14209.  
  14210. The Control Panel uses the cdevValue parameter to send status information to the
  14211. cdev, and a proper cdev uses its function value to send information back to the
  14212. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14213. Control Panel puts the last function value it received into cdevValue when it calls
  14214. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14215. may want to keep a handle to its own storage, in which case passing it as the function
  14216. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14217. at the next call.
  14218.  
  14219. Four constants have been defined for this cdev/Control Panel communication:
  14220.  
  14221. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14222. #define  cdevGenErr      -1    /*generic cdev error*/
  14223. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14224. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14225.  
  14226. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14227. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14228. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14229. and pointers it has set up, strip the stack back to the same position as a normal
  14230. exit, and return one of the three error codes as the function result.  The Control
  14231. Panel will respond as follows:
  14232.  
  14233.   Function           Message to                     Control Panel Action    
  14234.   Result             Control Panel   
  14235.  
  14236.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14237.                      error from which it cannot     send a 0 in cdevValue in
  14238.                      recover, but do not put up     succeeding cdev calls
  14239.                      an error dialog.
  14240.  
  14241.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14242.                      there is not enough memory to  up error dialog, send a 0
  14243.                      execute; please put up a       in cdevValue in succeeding
  14244.                      memory error dialog.           cdev calls.
  14245.  
  14246.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14247.                      resource; please put up a      up error dialog, send a 0
  14248.                      resource error dialog.         in cdevValue in succeeding
  14249.                                                     cdev calls.
  14250.  
  14251.   all other values,  No error conditions.           Send the value back in
  14252.   either handles                                    cdevValue.
  14253.   or cdevUnset
  14254.  
  14255. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14256. responded to a cdev error message by shutting down the cdev and displaying an error
  14257. dialog if one was requested.  The cdev should immediately exit.
  14258.  
  14259. Once the Control Panel has responded to an error message from a cdev it will no
  14260. longer respond to any return values until another cdev is launched.
  14261.  
  14262. æKY cancelMsg
  14263. æFc Devices.h
  14264. æT 
  14265. æD     cancelMsg = 3, /*user clicked Cancel button*/
  14266. æC 
  14267. »CDEV ERROR CHECKING
  14268. _______________________________________________________________________________
  14269.  
  14270. Because a desk accessory may be called into many strange and wonderful situations,
  14271. careful attention must be paid to error checking.  The two most common error conditions
  14272. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14273. have been provided in the Control Panel to help with errors encountered in a cdev.
  14274.  
  14275. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14276. must be able to detect and recover from error conditions on its own.  If the recovery
  14277. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14278. back to the Control Panel with an error code.
  14279.  
  14280. Following a shutdown, the Control Panel can help report the error condition to the
  14281. user and prevent accidental reentry into the cdev that might result from such things
  14282. as an update event.  A cdev can request three different error reporting mechanisms
  14283. from the Control Panel:
  14284.  
  14285.   •  If a memory error has occured, then, after the cdev has safely shut
  14286.      itself down, it may request the Control Panel to issue an out-of-memory
  14287.      error message and gray out (paint over with the background pattern) the
  14288.      cdev area of the Control Panel window.  It will remain grayed until
  14289.      another cdev is selected.  The Control Panel window itself is not
  14290.      closed since other cdevs may still be able to function in the environment.
  14291.   •  If a resource error is detected, the cdev may request that a
  14292.      can’t-find-needed-resource error message be issued.
  14293.   •  The cdev may display its own error message and then call on the
  14294.      Control Panel to gray its area.
  14295.  
  14296. The Control Panel uses the cdevValue parameter to send status information to the
  14297. cdev, and a proper cdev uses its function value to send information back to the
  14298. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14299. Control Panel puts the last function value it received into cdevValue when it calls
  14300. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14301. may want to keep a handle to its own storage, in which case passing it as the function
  14302. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14303. at the next call.
  14304.  
  14305. Four constants have been defined for this cdev/Control Panel communication:
  14306.  
  14307. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14308. #define  cdevGenErr      -1    /*generic cdev error*/
  14309. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14310. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14311.  
  14312. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14313. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14314. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14315. and pointers it has set up, strip the stack back to the same position as a normal
  14316. exit, and return one of the three error codes as the function result.  The Control
  14317. Panel will respond as follows:
  14318.  
  14319.   Function           Message to                     Control Panel Action    
  14320.   Result             Control Panel   
  14321.  
  14322.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14323.                      error from which it cannot     send a 0 in cdevValue in
  14324.                      recover, but do not put up     succeeding cdev calls
  14325.                      an error dialog.
  14326.  
  14327.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14328.                      there is not enough memory to  up error dialog, send a 0
  14329.                      execute; please put up a       in cdevValue in succeeding
  14330.                      memory error dialog.           cdev calls.
  14331.  
  14332.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14333.                      resource; please put up a      up error dialog, send a 0
  14334.                      resource error dialog.         in cdevValue in succeeding
  14335.                                                     cdev calls.
  14336.  
  14337.   all other values,  No error conditions.           Send the value back in
  14338.   either handles                                    cdevValue.
  14339.   or cdevUnset
  14340.  
  14341. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14342. responded to a cdev error message by shutting down the cdev and displaying an error
  14343. dialog if one was requested.  The cdev should immediately exit.
  14344.  
  14345. Once the Control Panel has responded to an error message from a cdev it will no
  14346. longer respond to any return values until another cdev is launched.
  14347.  
  14348. æKY hitMsg
  14349. æFc Devices.h
  14350. æT 
  14351. æD     hitMsg = 4, /*user clicked control in Options dialog*/
  14352. æC 
  14353. »CDEV ERROR CHECKING
  14354. _______________________________________________________________________________
  14355.  
  14356. Because a desk accessory may be called into many strange and wonderful situations,
  14357. careful attention must be paid to error checking.  The two most common error conditions
  14358. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14359. have been provided in the Control Panel to help with errors encountered in a cdev.
  14360.  
  14361. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14362. must be able to detect and recover from error conditions on its own.  If the recovery
  14363. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14364. back to the Control Panel with an error code.
  14365.  
  14366. Following a shutdown, the Control Panel can help report the error condition to the
  14367. user and prevent accidental reentry into the cdev that might result from such things
  14368. as an update event.  A cdev can request three different error reporting mechanisms
  14369. from the Control Panel:
  14370.  
  14371.   •  If a memory error has occured, then, after the cdev has safely shut
  14372.      itself down, it may request the Control Panel to issue an out-of-memory
  14373.      error message and gray out (paint over with the background pattern) the
  14374.      cdev area of the Control Panel window.  It will remain grayed until
  14375.      another cdev is selected.  The Control Panel window itself is not
  14376.      closed since other cdevs may still be able to function in the environment.
  14377.   •  If a resource error is detected, the cdev may request that a
  14378.      can’t-find-needed-resource error message be issued.
  14379.   •  The cdev may display its own error message and then call on the
  14380.      Control Panel to gray its area.
  14381.  
  14382. The Control Panel uses the cdevValue parameter to send status information to the
  14383. cdev, and a proper cdev uses its function value to send information back to the
  14384. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14385. Control Panel puts the last function value it received into cdevValue when it calls
  14386. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14387. may want to keep a handle to its own storage, in which case passing it as the function
  14388. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14389. at the next call.
  14390.  
  14391. Four constants have been defined for this cdev/Control Panel communication:
  14392.  
  14393. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14394. #define  cdevGenErr      -1    /*generic cdev error*/
  14395. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14396. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14397.  
  14398. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14399. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14400. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14401. and pointers it has set up, strip the stack back to the same position as a normal
  14402. exit, and return one of the three error codes as the function result.  The Control
  14403. Panel will respond as follows:
  14404.  
  14405.   Function           Message to                     Control Panel Action    
  14406.   Result             Control Panel   
  14407.  
  14408.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14409.                      error from which it cannot     send a 0 in cdevValue in
  14410.                      recover, but do not put up     succeeding cdev calls
  14411.                      an error dialog.
  14412.  
  14413.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14414.                      there is not enough memory to  up error dialog, send a 0
  14415.                      execute; please put up a       in cdevValue in succeeding
  14416.                      memory error dialog.           cdev calls.
  14417.  
  14418.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14419.                      resource; please put up a      up error dialog, send a 0
  14420.                      resource error dialog.         in cdevValue in succeeding
  14421.                                                     cdev calls.
  14422.  
  14423.   all other values,  No error conditions.           Send the value back in
  14424.   either handles                                    cdevValue.
  14425.   or cdevUnset
  14426.  
  14427. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14428. responded to a cdev error message by shutting down the cdev and displaying an error
  14429. dialog if one was requested.  The cdev should immediately exit.
  14430.  
  14431. Once the Control Panel has responded to an error message from a cdev it will no
  14432. longer respond to any return values until another cdev is launched.
  14433.  
  14434. æKY nulMsg
  14435. æFc Devices.h
  14436. æT 
  14437. æD     nulMsg = 5, /*periodic event*/
  14438. æC 
  14439. »CDEV ERROR CHECKING
  14440. _______________________________________________________________________________
  14441.  
  14442. Because a desk accessory may be called into many strange and wonderful situations,
  14443. careful attention must be paid to error checking.  The two most common error conditions
  14444. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14445. have been provided in the Control Panel to help with errors encountered in a cdev.
  14446.  
  14447. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14448. must be able to detect and recover from error conditions on its own.  If the recovery
  14449. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14450. back to the Control Panel with an error code.
  14451.  
  14452. Following a shutdown, the Control Panel can help report the error condition to the
  14453. user and prevent accidental reentry into the cdev that might result from such things
  14454. as an update event.  A cdev can request three different error reporting mechanisms
  14455. from the Control Panel:
  14456.  
  14457.   •  If a memory error has occured, then, after the cdev has safely shut
  14458.      itself down, it may request the Control Panel to issue an out-of-memory
  14459.      error message and gray out (paint over with the background pattern) the
  14460.      cdev area of the Control Panel window.  It will remain grayed until
  14461.      another cdev is selected.  The Control Panel window itself is not
  14462.      closed since other cdevs may still be able to function in the environment.
  14463.   •  If a resource error is detected, the cdev may request that a
  14464.      can’t-find-needed-resource error message be issued.
  14465.   •  The cdev may display its own error message and then call on the
  14466.      Control Panel to gray its area.
  14467.  
  14468. The Control Panel uses the cdevValue parameter to send status information to the
  14469. cdev, and a proper cdev uses its function value to send information back to the
  14470. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14471. Control Panel puts the last function value it received into cdevValue when it calls
  14472. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14473. may want to keep a handle to its own storage, in which case passing it as the function
  14474. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14475. at the next call.
  14476.  
  14477. Four constants have been defined for this cdev/Control Panel communication:
  14478.  
  14479. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14480. #define  cdevGenErr      -1    /*generic cdev error*/
  14481. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14482. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14483.  
  14484. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14485. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14486. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14487. and pointers it has set up, strip the stack back to the same position as a normal
  14488. exit, and return one of the three error codes as the function result.  The Control
  14489. Panel will respond as follows:
  14490.  
  14491.   Function           Message to                     Control Panel Action    
  14492.   Result             Control Panel   
  14493.  
  14494.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14495.                      error from which it cannot     send a 0 in cdevValue in
  14496.                      recover, but do not put up     succeeding cdev calls
  14497.                      an error dialog.
  14498.  
  14499.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14500.                      there is not enough memory to  up error dialog, send a 0
  14501.                      execute; please put up a       in cdevValue in succeeding
  14502.                      memory error dialog.           cdev calls.
  14503.  
  14504.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14505.                      resource; please put up a      up error dialog, send a 0
  14506.                      resource error dialog.         in cdevValue in succeeding
  14507.                                                     cdev calls.
  14508.  
  14509.   all other values,  No error conditions.           Send the value back in
  14510.   either handles                                    cdevValue.
  14511.   or cdevUnset
  14512.  
  14513. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14514. responded to a cdev error message by shutting down the cdev and displaying an error
  14515. dialog if one was requested.  The cdev should immediately exit.
  14516.  
  14517. Once the Control Panel has responded to an error message from a cdev it will no
  14518. longer respond to any return values until another cdev is launched.
  14519.  
  14520. æKY updateMsg
  14521. æFc Devices.h
  14522. æT 
  14523. æD     updateMsg = 6, /*update event*/
  14524. æC 
  14525. »CDEV ERROR CHECKING
  14526. _______________________________________________________________________________
  14527.  
  14528. Because a desk accessory may be called into many strange and wonderful situations,
  14529. careful attention must be paid to error checking.  The two most common error conditions
  14530. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14531. have been provided in the Control Panel to help with errors encountered in a cdev.
  14532.  
  14533. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14534. must be able to detect and recover from error conditions on its own.  If the recovery
  14535. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14536. back to the Control Panel with an error code.
  14537.  
  14538. Following a shutdown, the Control Panel can help report the error condition to the
  14539. user and prevent accidental reentry into the cdev that might result from such things
  14540. as an update event.  A cdev can request three different error reporting mechanisms
  14541. from the Control Panel:
  14542.  
  14543.   •  If a memory error has occured, then, after the cdev has safely shut
  14544.      itself down, it may request the Control Panel to issue an out-of-memory
  14545.      error message and gray out (paint over with the background pattern) the
  14546.      cdev area of the Control Panel window.  It will remain grayed until
  14547.      another cdev is selected.  The Control Panel window itself is not
  14548.      closed since other cdevs may still be able to function in the environment.
  14549.   •  If a resource error is detected, the cdev may request that a
  14550.      can’t-find-needed-resource error message be issued.
  14551.   •  The cdev may display its own error message and then call on the
  14552.      Control Panel to gray its area.
  14553.  
  14554. The Control Panel uses the cdevValue parameter to send status information to the
  14555. cdev, and a proper cdev uses its function value to send information back to the
  14556. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14557. Control Panel puts the last function value it received into cdevValue when it calls
  14558. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14559. may want to keep a handle to its own storage, in which case passing it as the function
  14560. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14561. at the next call.
  14562.  
  14563. Four constants have been defined for this cdev/Control Panel communication:
  14564.  
  14565. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14566. #define  cdevGenErr      -1    /*generic cdev error*/
  14567. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14568. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14569.  
  14570. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14571. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14572. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14573. and pointers it has set up, strip the stack back to the same position as a normal
  14574. exit, and return one of the three error codes as the function result.  The Control
  14575. Panel will respond as follows:
  14576.  
  14577.   Function           Message to                     Control Panel Action    
  14578.   Result             Control Panel   
  14579.  
  14580.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14581.                      error from which it cannot     send a 0 in cdevValue in
  14582.                      recover, but do not put up     succeeding cdev calls
  14583.                      an error dialog.
  14584.  
  14585.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14586.                      there is not enough memory to  up error dialog, send a 0
  14587.                      execute; please put up a       in cdevValue in succeeding
  14588.                      memory error dialog.           cdev calls.
  14589.  
  14590.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14591.                      resource; please put up a      up error dialog, send a 0
  14592.                      resource error dialog.         in cdevValue in succeeding
  14593.                                                     cdev calls.
  14594.  
  14595.   all other values,  No error conditions.           Send the value back in
  14596.   either handles                                    cdevValue.
  14597.   or cdevUnset
  14598.  
  14599. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14600. responded to a cdev error message by shutting down the cdev and displaying an error
  14601. dialog if one was requested.  The cdev should immediately exit.
  14602.  
  14603. Once the Control Panel has responded to an error message from a cdev it will no
  14604. longer respond to any return values until another cdev is launched.
  14605.  
  14606. æKY activateMsg
  14607. æFc Devices.h
  14608. æT 
  14609. æD     activateMsg = 7, /*not used*/
  14610. æC 
  14611. »CDEV ERROR CHECKING
  14612. _______________________________________________________________________________
  14613.  
  14614. Because a desk accessory may be called into many strange and wonderful situations,
  14615. careful attention must be paid to error checking.  The two most common error conditions
  14616. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14617. have been provided in the Control Panel to help with errors encountered in a cdev.
  14618.  
  14619. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14620. must be able to detect and recover from error conditions on its own.  If the recovery
  14621. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14622. back to the Control Panel with an error code.
  14623.  
  14624. Following a shutdown, the Control Panel can help report the error condition to the
  14625. user and prevent accidental reentry into the cdev that might result from such things
  14626. as an update event.  A cdev can request three different error reporting mechanisms
  14627. from the Control Panel:
  14628.  
  14629.   •  If a memory error has occured, then, after the cdev has safely shut
  14630.      itself down, it may request the Control Panel to issue an out-of-memory
  14631.      error message and gray out (paint over with the background pattern) the
  14632.      cdev area of the Control Panel window.  It will remain grayed until
  14633.      another cdev is selected.  The Control Panel window itself is not
  14634.      closed since other cdevs may still be able to function in the environment.
  14635.   •  If a resource error is detected, the cdev may request that a
  14636.      can’t-find-needed-resource error message be issued.
  14637.   •  The cdev may display its own error message and then call on the
  14638.      Control Panel to gray its area.
  14639.  
  14640. The Control Panel uses the cdevValue parameter to send status information to the
  14641. cdev, and a proper cdev uses its function value to send information back to the
  14642. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14643. Control Panel puts the last function value it received into cdevValue when it calls
  14644. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14645. may want to keep a handle to its own storage, in which case passing it as the function
  14646. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14647. at the next call.
  14648.  
  14649. Four constants have been defined for this cdev/Control Panel communication:
  14650.  
  14651. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14652. #define  cdevGenErr      -1    /*generic cdev error*/
  14653. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14654. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14655.  
  14656. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14657. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14658. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14659. and pointers it has set up, strip the stack back to the same position as a normal
  14660. exit, and return one of the three error codes as the function result.  The Control
  14661. Panel will respond as follows:
  14662.  
  14663.   Function           Message to                     Control Panel Action    
  14664.   Result             Control Panel   
  14665.  
  14666.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14667.                      error from which it cannot     send a 0 in cdevValue in
  14668.                      recover, but do not put up     succeeding cdev calls
  14669.                      an error dialog.
  14670.  
  14671.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14672.                      there is not enough memory to  up error dialog, send a 0
  14673.                      execute; please put up a       in cdevValue in succeeding
  14674.                      memory error dialog.           cdev calls.
  14675.  
  14676.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14677.                      resource; please put up a      up error dialog, send a 0
  14678.                      resource error dialog.         in cdevValue in succeeding
  14679.                                                     cdev calls.
  14680.  
  14681.   all other values,  No error conditions.           Send the value back in
  14682.   either handles                                    cdevValue.
  14683.   or cdevUnset
  14684.  
  14685. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14686. responded to a cdev error message by shutting down the cdev and displaying an error
  14687. dialog if one was requested.  The cdev should immediately exit.
  14688.  
  14689. Once the Control Panel has responded to an error message from a cdev it will no
  14690. longer respond to any return values until another cdev is launched.
  14691.  
  14692. æKY deactivateMsg
  14693. æFc Devices.h
  14694. æT 
  14695. æD     deactivateMsg = 8, /*not used*/
  14696. æC 
  14697. »CDEV ERROR CHECKING
  14698. _______________________________________________________________________________
  14699.  
  14700. Because a desk accessory may be called into many strange and wonderful situations,
  14701. careful attention must be paid to error checking.  The two most common error conditions
  14702. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14703. have been provided in the Control Panel to help with errors encountered in a cdev.
  14704.  
  14705. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14706. must be able to detect and recover from error conditions on its own.  If the recovery
  14707. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14708. back to the Control Panel with an error code.
  14709.  
  14710. Following a shutdown, the Control Panel can help report the error condition to the
  14711. user and prevent accidental reentry into the cdev that might result from such things
  14712. as an update event.  A cdev can request three different error reporting mechanisms
  14713. from the Control Panel:
  14714.  
  14715.   •  If a memory error has occured, then, after the cdev has safely shut
  14716.      itself down, it may request the Control Panel to issue an out-of-memory
  14717.      error message and gray out (paint over with the background pattern) the
  14718.      cdev area of the Control Panel window.  It will remain grayed until
  14719.      another cdev is selected.  The Control Panel window itself is not
  14720.      closed since other cdevs may still be able to function in the environment.
  14721.   •  If a resource error is detected, the cdev may request that a
  14722.      can’t-find-needed-resource error message be issued.
  14723.   •  The cdev may display its own error message and then call on the
  14724.      Control Panel to gray its area.
  14725.  
  14726. The Control Panel uses the cdevValue parameter to send status information to the
  14727. cdev, and a proper cdev uses its function value to send information back to the
  14728. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14729. Control Panel puts the last function value it received into cdevValue when it calls
  14730. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14731. may want to keep a handle to its own storage, in which case passing it as the function
  14732. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14733. at the next call.
  14734.  
  14735. Four constants have been defined for this cdev/Control Panel communication:
  14736.  
  14737. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14738. #define  cdevGenErr      -1    /*generic cdev error*/
  14739. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14740. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14741.  
  14742. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14743. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14744. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14745. and pointers it has set up, strip the stack back to the same position as a normal
  14746. exit, and return one of the three error codes as the function result.  The Control
  14747. Panel will respond as follows:
  14748.  
  14749.   Function           Message to                     Control Panel Action    
  14750.   Result             Control Panel   
  14751.  
  14752.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14753.                      error from which it cannot     send a 0 in cdevValue in
  14754.                      recover, but do not put up     succeeding cdev calls
  14755.                      an error dialog.
  14756.  
  14757.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14758.                      there is not enough memory to  up error dialog, send a 0
  14759.                      execute; please put up a       in cdevValue in succeeding
  14760.                      memory error dialog.           cdev calls.
  14761.  
  14762.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14763.                      resource; please put up a      up error dialog, send a 0
  14764.                      resource error dialog.         in cdevValue in succeeding
  14765.                                                     cdev calls.
  14766.  
  14767.   all other values,  No error conditions.           Send the value back in
  14768.   either handles                                    cdevValue.
  14769.   or cdevUnset
  14770.  
  14771. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14772. responded to a cdev error message by shutting down the cdev and displaying an error
  14773. dialog if one was requested.  The cdev should immediately exit.
  14774.  
  14775. Once the Control Panel has responded to an error message from a cdev it will no
  14776. longer respond to any return values until another cdev is launched.
  14777.  
  14778. æKY keyEvtMsg
  14779. æFc Devices.h
  14780. æT 
  14781. æD     keyEvtMsg = 9, /*keyboard event*/
  14782. æC 
  14783. »CDEV ERROR CHECKING
  14784. _______________________________________________________________________________
  14785.  
  14786. Because a desk accessory may be called into many strange and wonderful situations,
  14787. careful attention must be paid to error checking.  The two most common error conditions
  14788. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14789. have been provided in the Control Panel to help with errors encountered in a cdev.
  14790.  
  14791. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14792. must be able to detect and recover from error conditions on its own.  If the recovery
  14793. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14794. back to the Control Panel with an error code.
  14795.  
  14796. Following a shutdown, the Control Panel can help report the error condition to the
  14797. user and prevent accidental reentry into the cdev that might result from such things
  14798. as an update event.  A cdev can request three different error reporting mechanisms
  14799. from the Control Panel:
  14800.  
  14801.   •  If a memory error has occured, then, after the cdev has safely shut
  14802.      itself down, it may request the Control Panel to issue an out-of-memory
  14803.      error message and gray out (paint over with the background pattern) the
  14804.      cdev area of the Control Panel window.  It will remain grayed until
  14805.      another cdev is selected.  The Control Panel window itself is not
  14806.      closed since other cdevs may still be able to function in the environment.
  14807.   •  If a resource error is detected, the cdev may request that a
  14808.      can’t-find-needed-resource error message be issued.
  14809.   •  The cdev may display its own error message and then call on the
  14810.      Control Panel to gray its area.
  14811.  
  14812. The Control Panel uses the cdevValue parameter to send status information to the
  14813. cdev, and a proper cdev uses its function value to send information back to the
  14814. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14815. Control Panel puts the last function value it received into cdevValue when it calls
  14816. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14817. may want to keep a handle to its own storage, in which case passing it as the function
  14818. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14819. at the next call.
  14820.  
  14821. Four constants have been defined for this cdev/Control Panel communication:
  14822.  
  14823. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14824. #define  cdevGenErr      -1    /*generic cdev error*/
  14825. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14826. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14827.  
  14828. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14829. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14830. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14831. and pointers it has set up, strip the stack back to the same position as a normal
  14832. exit, and return one of the three error codes as the function result.  The Control
  14833. Panel will respond as follows:
  14834.  
  14835.   Function           Message to                     Control Panel Action    
  14836.   Result             Control Panel   
  14837.  
  14838.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14839.                      error from which it cannot     send a 0 in cdevValue in
  14840.                      recover, but do not put up     succeeding cdev calls
  14841.                      an error dialog.
  14842.  
  14843.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14844.                      there is not enough memory to  up error dialog, send a 0
  14845.                      execute; please put up a       in cdevValue in succeeding
  14846.                      memory error dialog.           cdev calls.
  14847.  
  14848.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14849.                      resource; please put up a      up error dialog, send a 0
  14850.                      resource error dialog.         in cdevValue in succeeding
  14851.                                                     cdev calls.
  14852.  
  14853.   all other values,  No error conditions.           Send the value back in
  14854.   either handles                                    cdevValue.
  14855.   or cdevUnset
  14856.  
  14857. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14858. responded to a cdev error message by shutting down the cdev and displaying an error
  14859. dialog if one was requested.  The cdev should immediately exit.
  14860.  
  14861. Once the Control Panel has responded to an error message from a cdev it will no
  14862. longer respond to any return values until another cdev is launched.
  14863.  
  14864. æKY superMsg
  14865. æFc Devices.h
  14866. æT 
  14867. æD     superMsg = 10, /*show superuser controls*/
  14868. æC 
  14869. »CDEV ERROR CHECKING
  14870. _______________________________________________________________________________
  14871.  
  14872. Because a desk accessory may be called into many strange and wonderful situations,
  14873. careful attention must be paid to error checking.  The two most common error conditions
  14874. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14875. have been provided in the Control Panel to help with errors encountered in a cdev.
  14876.  
  14877. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14878. must be able to detect and recover from error conditions on its own.  If the recovery
  14879. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14880. back to the Control Panel with an error code.
  14881.  
  14882. Following a shutdown, the Control Panel can help report the error condition to the
  14883. user and prevent accidental reentry into the cdev that might result from such things
  14884. as an update event.  A cdev can request three different error reporting mechanisms
  14885. from the Control Panel:
  14886.  
  14887.   •  If a memory error has occured, then, after the cdev has safely shut
  14888.      itself down, it may request the Control Panel to issue an out-of-memory
  14889.      error message and gray out (paint over with the background pattern) the
  14890.      cdev area of the Control Panel window.  It will remain grayed until
  14891.      another cdev is selected.  The Control Panel window itself is not
  14892.      closed since other cdevs may still be able to function in the environment.
  14893.   •  If a resource error is detected, the cdev may request that a
  14894.      can’t-find-needed-resource error message be issued.
  14895.   •  The cdev may display its own error message and then call on the
  14896.      Control Panel to gray its area.
  14897.  
  14898. The Control Panel uses the cdevValue parameter to send status information to the
  14899. cdev, and a proper cdev uses its function value to send information back to the
  14900. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14901. Control Panel puts the last function value it received into cdevValue when it calls
  14902. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14903. may want to keep a handle to its own storage, in which case passing it as the function
  14904. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14905. at the next call.
  14906.  
  14907. Four constants have been defined for this cdev/Control Panel communication:
  14908.  
  14909. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14910. #define  cdevGenErr      -1    /*generic cdev error*/
  14911. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14912. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14913.  
  14914. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  14915. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  14916. back and forth.  If the cdev encounters an error, it should dispose of all handles
  14917. and pointers it has set up, strip the stack back to the same position as a normal
  14918. exit, and return one of the three error codes as the function result.  The Control
  14919. Panel will respond as follows:
  14920.  
  14921.   Function           Message to                     Control Panel Action    
  14922.   Result             Control Panel   
  14923.  
  14924.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  14925.                      error from which it cannot     send a 0 in cdevValue in
  14926.                      recover, but do not put up     succeeding cdev calls
  14927.                      an error dialog.
  14928.  
  14929.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  14930.                      there is not enough memory to  up error dialog, send a 0
  14931.                      execute; please put up a       in cdevValue in succeeding
  14932.                      memory error dialog.           cdev calls.
  14933.  
  14934.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  14935.                      resource; please put up a      up error dialog, send a 0
  14936.                      resource error dialog.         in cdevValue in succeeding
  14937.                                                     cdev calls.
  14938.  
  14939.   all other values,  No error conditions.           Send the value back in
  14940.   either handles                                    cdevValue.
  14941.   or cdevUnset
  14942.  
  14943. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  14944. responded to a cdev error message by shutting down the cdev and displaying an error
  14945. dialog if one was requested.  The cdev should immediately exit.
  14946.  
  14947. Once the Control Panel has responded to an error message from a cdev it will no
  14948. longer respond to any return values until another cdev is launched.
  14949.  
  14950. æKY normalMsg
  14951. æFc Devices.h
  14952. æT 
  14953. æD     normalMsg = 11, /*show only normal controls*/
  14954. æC 
  14955. »CDEV ERROR CHECKING
  14956. _______________________________________________________________________________
  14957.  
  14958. Because a desk accessory may be called into many strange and wonderful situations,
  14959. careful attention must be paid to error checking.  The two most common error conditions
  14960. are missing resources and lack of memory.  Some error reporting and recovery facilities
  14961. have been provided in the Control Panel to help with errors encountered in a cdev.
  14962.  
  14963. Because the Control Panel has no direct information about the cdev, the cdev’s code
  14964. must be able to detect and recover from error conditions on its own.  If the recovery
  14965. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  14966. back to the Control Panel with an error code.
  14967.  
  14968. Following a shutdown, the Control Panel can help report the error condition to the
  14969. user and prevent accidental reentry into the cdev that might result from such things
  14970. as an update event.  A cdev can request three different error reporting mechanisms
  14971. from the Control Panel:
  14972.  
  14973.   •  If a memory error has occured, then, after the cdev has safely shut
  14974.      itself down, it may request the Control Panel to issue an out-of-memory
  14975.      error message and gray out (paint over with the background pattern) the
  14976.      cdev area of the Control Panel window.  It will remain grayed until
  14977.      another cdev is selected.  The Control Panel window itself is not
  14978.      closed since other cdevs may still be able to function in the environment.
  14979.   •  If a resource error is detected, the cdev may request that a
  14980.      can’t-find-needed-resource error message be issued.
  14981.   •  The cdev may display its own error message and then call on the
  14982.      Control Panel to gray its area.
  14983.  
  14984. The Control Panel uses the cdevValue parameter to send status information to the
  14985. cdev, and a proper cdev uses its function value to send information back to the
  14986. Control Panel.  In the absence of errors, the same value passes back and forth: the
  14987. Control Panel puts the last function value it received into cdevValue when it calls
  14988. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  14989. may want to keep a handle to its own storage, in which case passing it as the function
  14990. value ensures its availability, since the Control Panel will pass it back in cdevValue
  14991. at the next call.
  14992.  
  14993. Four constants have been defined for this cdev/Control Panel communication:
  14994.  
  14995. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  14996. #define  cdevGenErr      -1    /*generic cdev error*/
  14997. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  14998. #define  cdevResErr       1    /*missing resource needed by cdev*/
  14999.  
  15000. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  15001. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  15002. back and forth.  If the cdev encounters an error, it should dispose of all handles
  15003. and pointers it has set up, strip the stack back to the same position as a normal
  15004. exit, and return one of the three error codes as the function result.  The Control
  15005. Panel will respond as follows:
  15006.  
  15007.   Function           Message to                     Control Panel Action    
  15008.   Result             Control Panel   
  15009.  
  15010.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  15011.                      error from which it cannot     send a 0 in cdevValue in
  15012.                      recover, but do not put up     succeeding cdev calls
  15013.                      an error dialog.
  15014.  
  15015.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  15016.                      there is not enough memory to  up error dialog, send a 0
  15017.                      execute; please put up a       in cdevValue in succeeding
  15018.                      memory error dialog.           cdev calls.
  15019.  
  15020.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  15021.                      resource; please put up a      up error dialog, send a 0
  15022.                      resource error dialog.         in cdevValue in succeeding
  15023.                                                     cdev calls.
  15024.  
  15025.   all other values,  No error conditions.           Send the value back in
  15026.   either handles                                    cdevValue.
  15027.   or cdevUnset
  15028.  
  15029. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15030. responded to a cdev error message by shutting down the cdev and displaying an error
  15031. dialog if one was requested.  The cdev should immediately exit.
  15032.  
  15033. Once the Control Panel has responded to an error message from a cdev it will no
  15034. longer respond to any return values until another cdev is launched.
  15035.  
  15036. æKY startupMsg
  15037. æFc Devices.h
  15038. æT 
  15039. æD     startupMsg = 12, /*code has been loaded*/
  15040. æC 
  15041. »CDEV ERROR CHECKING
  15042. _______________________________________________________________________________
  15043.  
  15044. Because a desk accessory may be called into many strange and wonderful situations,
  15045. careful attention must be paid to error checking.  The two most common error conditions
  15046. are missing resources and lack of memory.  Some error reporting and recovery facilities
  15047. have been provided in the Control Panel to help with errors encountered in a cdev.
  15048.  
  15049. Because the Control Panel has no direct information about the cdev, the cdev’s code
  15050. must be able to detect and recover from error conditions on its own.  If the recovery
  15051. cannot be effected the cdev must dispose of any memory it has allocated, and exit
  15052. back to the Control Panel with an error code.
  15053.  
  15054. Following a shutdown, the Control Panel can help report the error condition to the
  15055. user and prevent accidental reentry into the cdev that might result from such things
  15056. as an update event.  A cdev can request three different error reporting mechanisms
  15057. from the Control Panel:
  15058.  
  15059.   •  If a memory error has occured, then, after the cdev has safely shut
  15060.      itself down, it may request the Control Panel to issue an out-of-memory
  15061.      error message and gray out (paint over with the background pattern) the
  15062.      cdev area of the Control Panel window.  It will remain grayed until
  15063.      another cdev is selected.  The Control Panel window itself is not
  15064.      closed since other cdevs may still be able to function in the environment.
  15065.   •  If a resource error is detected, the cdev may request that a
  15066.      can’t-find-needed-resource error message be issued.
  15067.   •  The cdev may display its own error message and then call on the
  15068.      Control Panel to gray its area.
  15069.  
  15070. The Control Panel uses the cdevValue parameter to send status information to the
  15071. cdev, and a proper cdev uses its function value to send information back to the
  15072. Control Panel.  In the absence of errors, the same value passes back and forth: the
  15073. Control Panel puts the last function value it received into cdevValue when it calls
  15074. the cdev; the cdev returns the value it finds there as the function value.  The cdev
  15075. may want to keep a handle to its own storage, in which case passing it as the function
  15076. value ensures its availability, since the Control Panel will pass it back in cdevValue
  15077. at the next call.
  15078.  
  15079. Four constants have been defined for this cdev/Control Panel communication:
  15080.  
  15081. #define  cdevUnset        3    /*initial value passed in cdevValue*/
  15082. #define  cdevGenErr      -1    /*generic cdev error*/
  15083. #define  cdevMemErr       0    /*insufficient memory for cdev execution*/
  15084. #define  cdevResErr       1    /*missing resource needed by cdev*/
  15085.  
  15086. After the macDev call, the Control Panel sends cdevUnset in cdevValue, so that until
  15087. an error occurs or the cdev uses its function value as a handle, cdevUnset is passed
  15088. back and forth.  If the cdev encounters an error, it should dispose of all handles
  15089. and pointers it has set up, strip the stack back to the same position as a normal
  15090. exit, and return one of the three error codes as the function result.  The Control
  15091. Panel will respond as follows:
  15092.  
  15093.   Function           Message to                     Control Panel Action    
  15094.   Result             Control Panel   
  15095.  
  15096.   cdevGenErr         The cdev has encountered an    Gray out the cdev’s area,
  15097.                      error from which it cannot     send a 0 in cdevValue in
  15098.                      recover, but do not put up     succeeding cdev calls
  15099.                      an error dialog.
  15100.  
  15101.   cdevMemErr         The cdev has determined that   Gray out cdev’s area, put
  15102.                      there is not enough memory to  up error dialog, send a 0
  15103.                      execute; please put up a       in cdevValue in succeeding
  15104.                      memory error dialog.           cdev calls.
  15105.  
  15106.   cdevResErr         The cdev can’t find a needed   Gray out cdev’s area, put
  15107.                      resource; please put up a      up error dialog, send a 0
  15108.                      resource error dialog.         in cdevValue in succeeding
  15109.                                                     cdev calls.
  15110.  
  15111.   all other values,  No error conditions.           Send the value back in
  15112.   either handles                                    cdevValue.
  15113.   or cdevUnset
  15114.  
  15115. The cdev code should check cdevValue at entry.  A 0 means that the Control Panel has
  15116. responded to a cdev error message by shutting down the cdev and displaying an error
  15117. dialog if one was requested.  The cdev should immediately exit.
  15118.  
  15119. Once the Control Panel has responded to an error message from a cdev it will no
  15120. longer respond to any return values until another cdev is launched.
  15121.  
  15122. æKY DCtlEntry
  15123. DCtlPtr
  15124. DCtlHandle
  15125. æFc Devices.h
  15126. æT struct
  15127. æD struct DCtlEntry {
  15128.     Ptr dCtlDriver;
  15129.     short dCtlFlags;
  15130.     QHdr dCtlQHdr;
  15131.     long dCtlPosition;
  15132.     Handle dCtlStorage;
  15133.     short dCtlRefNum;
  15134.     long dCtlCurTicks;
  15135.     WindowPtr dCtlWindow;
  15136.     short dCtlDelay;
  15137.     short dCtlEMask;
  15138.     short dCtlMenu;
  15139. };
  15140.  
  15141. typedef struct DCtlEntry DCtlEntry;
  15142. typedef DCtlEntry *DCtlPtr, **DCtlHandle;
  15143. æC 
  15144. »Device Control Entry
  15145.  
  15146. The first time a driver is opened, information about it is read into a structure in
  15147. memory called a device control entry. A device control entry contains the header of
  15148. the driver’s I/O queue, the location of the driver’s routines, and other information.
  15149. A device control entry is a 40-byte relocatable block located in the system heap.
  15150. It’s locked while the driver is open, and unlocked while the driver is closed.
  15151.  
  15152. Most of the data in the device control entry is stored and accessed only by the
  15153. Device Manager, but in some cases the driver itself must store into it. The structure
  15154. of a device control entry is shown below; note that the first four words of the
  15155. driver are copied into the dCtlFlags, dCtlDelay, dCtlEMask, and dCtlMenu fields.
  15156.  
  15157. TYPE  DCtlEntry = RECORD
  15158.                     dCtlDriver:    Ptr;        {pointer to ROM driver or }
  15159.                                                { handle to RAM driver}
  15160.                     dCtlFlags:     INTEGER;    {flags}
  15161.                     dCtlQHdr:      QHdr;       {driver I/O queue header}
  15162.                     dCtlPosition:  LONGINT;    {byte position used by Read }
  15163.                                                { and Write calls}
  15164.                     dCtlStorage:   Handle;     {handle to RAM driver's }
  15165.                                                { private storage}
  15166.                     dCtlRefNum:    INTEGER;    {driver reference number}
  15167.                     dCtlCurTicks:  LONGINT;    {used internally}
  15168.                     dCtlWindow:    WindowPtr;  {pointer to driver's window}
  15169.                     dCtlDelay:     INTEGER;    {number of ticks between }
  15170.                                                { periodic actions}
  15171.                     dCtlEMask:     INTEGER;    {desk accessory event mask}
  15172.                     dCtlMenu:      INTEGER     {menu ID of menu associated
  15173.                                                { with driver}
  15174.                   END;
  15175.  
  15176.       DCtlPtr    = ^DCtlEntry;
  15177.       DCtlHandle = ^DCtlPtr;
  15178.  
  15179. The low-order byte of the dCtlFlags word contains the following flags:
  15180.  
  15181. Bit number    Meaning
  15182.  
  15183.     5         Set if driver is open
  15184.     6         Set if driver is RAM-based
  15185.     7         Set if driver is currently executing
  15186.  
  15187. Assembly-language note:  These flags can be accessed with the global
  15188.                          constants dOpened, dRAMBased, and drvrActive.
  15189.  
  15190. The high-order byte of the dCtlFlags word contains flags copied from the drvrFlags
  15191. word of the driver, as described above.
  15192.  
  15193. DCtlQHdr contains the header of the driver’s I/O queue (described below). DCtlPosition
  15194. is used only by drivers of block devices, and indicates the current source or destination
  15195. position of a Read or Write call. The position is given as a number of bytes beyond
  15196. the physical beginning of the medium used by the device. For example, if one logical
  15197. block of data has just been read from a 3 1/2-inch disk via the Disk Driver, dCtlPosition
  15198. will be 512.
  15199.  
  15200. ROM drivers generally use locations in low memory for their local storage. RAM drivers
  15201. may reserve memory within their code space, or allocate a relocatable block and keep
  15202. a handle to it in dCtlStorage (if the block resides in the application heap, its
  15203. handle will be set to NIL when the heap is reinitialized).
  15204.  
  15205. You can get a handle to a driver’s device control entry by calling the Device Manager
  15206. function GetDCtlEntry.
  15207.  
  15208. æKY AuxDCE
  15209. AuxDCEPtr
  15210. AuxDCEHandle
  15211. æFc Devices.h
  15212. æT struct
  15213. æD struct AuxDCE {
  15214.     Ptr dCtlDriver;
  15215.     short dCtlFlags;
  15216.     QHdr dCtlQHdr;
  15217.     long dCtlPosition;
  15218.     Handle dCtlStorage;
  15219.     short dCtlRefNum;
  15220.     long dCtlCurTicks;
  15221.     GrafPtr dCtlWindow;
  15222.     short dCtlDelay;
  15223.     short dCtlEMask;
  15224.     short dCtlMenu;
  15225.     char dCtlSlot;
  15226.     char dCtlSlotId;
  15227.     long dCtlDevBase;
  15228.     Ptr dCtlOwner;
  15229.     char dCtlExtDev;
  15230.     char fillByte;
  15231. };
  15232.  
  15233. typedef struct AuxDCE AuxDCE;
  15234. typedef AuxDCE *AuxDCEPtr, **AuxDCEHandle;
  15235. æC 
  15236.  
  15237. æKY GetDCtlEntry
  15238. æFc Devices.h
  15239. æT Function
  15240. æD pascal DCtlHandle GetDCtlEntry(short refNum); 
  15241. æDT DCtlHandle myVariable = GetDCtlEntry((short) refNum);
  15242. æMM
  15243. æRT 71
  15244. æRI II-190
  15245. æC 
  15246.  
  15247. æKY SetChooserAlert
  15248. æFc Devices.h
  15249. æT Function
  15250. æD pascal Boolean SetChooserAlert(Boolean f); 
  15251. æDT Boolean myVariable = SetChooserAlert((Boolean) f);
  15252. æRI V-431
  15253. æC 
  15254. If f is true, the Chooser will put up the page setup alert; if f is false
  15255. it won’t.  SetChooserAlert returns the original alert state.  The 
  15256. application should restore the original alert state when it exits.
  15257. _____________________________________________________________________________________
  15258. Assembly-language note:  If the psAlert bit of the low-memory global
  15259. HiliteMode is 0 then no page setup alert will be generated. 
  15260. Applications that set or clear this bit must be sure not to affect
  15261. any other bits in the byte and to restore the bit as they leave.
  15262.      
  15263. HiliteMode  equ  $938
  15264. psAlert     equ  6
  15265. bclr        #psAlert,HiliteMode
  15266. bset        #psAlert,HiliteMode
  15267. _____________________________________________________________________________________
  15268.  
  15269. æKY OpenDriver
  15270. æFc Devices.h
  15271. æT Function
  15272. æD pascal OSErr OpenDriver(ConstStr255Param name,short *drvrRefNum); 
  15273. æDT OSErr myVariable = OpenDriver((ConstStr255Param) name,(short *) drvrRefNum);
  15274. æMM
  15275. æRI II-178, N14-2
  15276. æC 
  15277. [Not in ROM]
  15278.  
  15279. OpenDriver opens the device driver specified by name and returns its reference number
  15280. in refNum.
  15281.  
  15282. Result codes    noErr           No error
  15283.                 badUnitErr      Bad reference number
  15284.                 dInstErr        Couldn’t find driver in resource file
  15285.                 openErr         Driver can’t perform the requested
  15286.                                 reading or writing
  15287.                 unitEmptyErr    Bad reference number
  15288.  
  15289. æKY opendriver
  15290. æFc Devices.h
  15291. æT Function
  15292. æD OSErr opendriver(char *driverName,short *refNum); 
  15293. æDT OSErr myVariable = opendriver((char *) driverName,(short *) refNum);
  15294. æC 
  15295.  
  15296. æKY CloseDriver
  15297. æFc Devices.h
  15298. æT Function
  15299. æD pascal OSErr CloseDriver(short refNum); 
  15300. æDT OSErr myVariable = CloseDriver((short) refNum);
  15301. æRI II-178
  15302. æC 
  15303. [Not in ROM]
  15304.  
  15305. CloseDriver closes the device driver having the reference number refNum. Any pending
  15306. I/O is completed, and the memory used by the driver is released.
  15307.  
  15308. Warning:  Before using this command to close a particular driver, refer
  15309.           to the chapter describing the driver for the consequences of
  15310.           closing it.
  15311.  
  15312. Result codes    noErr           No error
  15313.                 badUnitErr      Bad reference number
  15314.                 dRemoveErr      Attempt to remove an open driver
  15315.                 unitEmptyErr    Bad reference number
  15316.  
  15317. æKY Control
  15318. æFc Devices.h
  15319. æT Function
  15320. æD pascal OSErr Control(short refNum,short csCode,const void *csParamPtr); 
  15321. æDT OSErr myVariable = Control((short) refNum,(short) csCode,(const void *) csParamPtr);
  15322. æMM
  15323. æRI II-186
  15324. æC 
  15325. [Not in ROM]
  15326.  
  15327. Control sends control information to the device driver having the reference number
  15328. refNum. The type of information sent is specified by csCode, and the information
  15329. itself is pointed to by csParamPtr. The values passed in csCode and pointed to by
  15330. csParamPtr depend on the driver being called.
  15331.  
  15332. Result codes    noErr           No error
  15333.                 badUnitErr      Bad reference number
  15334.                 notOpenErr      Driver isn’t open
  15335.                 unitEmptyErr    Bad reference number
  15336.                 controlErr      Driver can’t respond to this Control call
  15337.  
  15338. æKY Status
  15339. æFc Devices.h
  15340. æT Function
  15341. æD pascal OSErr Status(short refNum,short csCode,void *csParamPtr); 
  15342. æDT OSErr myVariable = Status((short) refNum,(short) csCode,(void *) csParamPtr);
  15343. æMM
  15344. æRI II-186
  15345. æC 
  15346. [Not in ROM]
  15347.  
  15348. Status returns status information about the device driver having the reference number
  15349. refNum. The type of information returned is specified by csCode, and the information
  15350. itself is pointed to by csParamPtr. The values passed in csCode and pointed to by
  15351. csParamPtr depend on the driver being called.
  15352.  
  15353. Result codes    noErr           No error
  15354.                 badUnitErr      Bad reference number
  15355.                 notOpenErr      Driver isn’t open
  15356.                 unitEmptyErr    Bad reference number
  15357.                 statusErr       Driver can’t respond to this Status call
  15358.  
  15359. æKY KillIO
  15360. æFc Devices.h
  15361. æT Function
  15362. æD pascal OSErr KillIO(short refNum); 
  15363. æDT OSErr myVariable = KillIO((short) refNum);
  15364. æRI II-179 
  15365. æC 
  15366. [Not in ROM]
  15367.  
  15368. KillIO terminates all current and pending I/O with the device driver having the
  15369. reference number refNum.
  15370.  
  15371. Result codes    noErr           No error
  15372.                 badUnitErr      Bad reference number
  15373.  
  15374. æKY PBControl
  15375. æFc Devices.h
  15376. æT Function
  15377. æD pascal OSErr PBControl(ParmBlkPtr paramBlock,Boolean async); 
  15378. æDT OSErr myVariable = PBControl((ParmBlkPtr) paramBlock,(Boolean) async);
  15379. æMM
  15380. æRI II-186
  15381. æC 
  15382. Trap macro    _Control
  15383.  
  15384. Parameter block
  15385.   -->    12    ioCompletion  pointer
  15386.   <--    16    ioResult      word
  15387.   -->    22    ioVRefNum     word
  15388.   -->    24    ioRefNum      word
  15389.   -->    26    csCode        word
  15390.   -->    28    csParam       record
  15391.  
  15392. PBControl sends control information to the device driver having the reference number
  15393. ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of information
  15394. sent is specified by csCode, and the information itself begins at csParam. The values
  15395. passed in csCode and csParam depend on the driver being called.
  15396.  
  15397. Result codes    noErr           No error
  15398.                 badUnitErr      Bad reference number
  15399.                 notOpenErr      Driver isn’t open
  15400.                 unitEmptyErr    Bad reference number
  15401.                 controlErr      Driver can’t respond to this Control call
  15402.  
  15403. æKY PBControlSync
  15404. æFc Devices.h
  15405. æT Function
  15406. æTN A004
  15407. æD #pragma parameter __D0 PBControlSync(__A0)
  15408. pascal OSErr PBControlSync(ParmBlkPtr paramBlock)
  15409.     = 0xA004; 
  15410. æDT #pragma parameter __D0 myVariable = PBControlSync()(__A0);
  15411. æMM
  15412. æRI II-186
  15413. æC 
  15414. Trap macro    _Control
  15415.  
  15416. Parameter block
  15417.   -->    12    ioCompletion  pointer
  15418.   <--    16    ioResult      word
  15419.   -->    22    ioVRefNum     word
  15420.   -->    24    ioRefNum      word
  15421.   -->    26    csCode        word
  15422.   -->    28    csParam       record
  15423.  
  15424. PBControl sends control information to the device driver having the reference number
  15425. ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of information
  15426. sent is specified by csCode, and the information itself begins at csParam. The values
  15427. passed in csCode and csParam depend on the driver being called.
  15428.  
  15429. Result codes    noErr           No error
  15430.                 badUnitErr      Bad reference number
  15431.                 notOpenErr      Driver isn’t open
  15432.                 unitEmptyErr    Bad reference number
  15433.                 controlErr      Driver can’t respond to this Control call
  15434.  
  15435. æKY PBControlAsync
  15436. æFc Devices.h
  15437. æT Function
  15438. æTN A404
  15439. æD #pragma parameter __D0 PBControlAsync(__A0)
  15440. pascal OSErr PBControlAsync(ParmBlkPtr paramBlock)
  15441.     = 0xA404; 
  15442. æDT #pragma parameter __D0 myVariable = PBControlAsync()(__A0);
  15443. æMM
  15444. æRI II-186
  15445. æC 
  15446. Trap macro    _Control
  15447.  
  15448. Parameter block
  15449.   -->    12    ioCompletion  pointer
  15450.   <--    16    ioResult      word
  15451.   -->    22    ioVRefNum     word
  15452.   -->    24    ioRefNum      word
  15453.   -->    26    csCode        word
  15454.   -->    28    csParam       record
  15455.  
  15456. PBControl sends control information to the device driver having the reference number
  15457. ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of information
  15458. sent is specified by csCode, and the information itself begins at csParam. The values
  15459. passed in csCode and csParam depend on the driver being called.
  15460.  
  15461. Result codes    noErr           No error
  15462.                 badUnitErr      Bad reference number
  15463.                 notOpenErr      Driver isn’t open
  15464.                 unitEmptyErr    Bad reference number
  15465.                 controlErr      Driver can’t respond to this Control call
  15466.  
  15467. æKY PBStatus
  15468. æFc Devices.h
  15469. æT Function
  15470. æD pascal OSErr PBStatus(ParmBlkPtr paramBlock,Boolean async); 
  15471. æDT OSErr myVariable = PBStatus((ParmBlkPtr) paramBlock,(Boolean) async);
  15472. æMM
  15473. æRI II-186
  15474. æC 
  15475. Trap macro    _Status
  15476.  
  15477. Parameter block
  15478.   -->    12    ioCompletion  pointer
  15479.   <--    16    ioResult      word
  15480.   -->    22    ioVRefNum     word
  15481.   -->    24    ioRefNum      word
  15482.   -->    26    csCode        word
  15483.   <--    28    csParam       record
  15484.  
  15485. PBStatus returns status information about the device driver having the reference
  15486. number ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of
  15487. information returned is specified by csCode, and the information itself begins at
  15488. csParam. The values passed in csCode and csParam depend on the driver being called.
  15489.  
  15490. Result codes    noErr           No error
  15491.                 badUnitErr      Bad reference number
  15492.                 notOpenErr      Driver isn’t open
  15493.                 unitEmptyErr    Bad reference number
  15494.                 statusErr       Driver can’t respond to this Status call
  15495.  
  15496. æKY PBStatusSync
  15497. æFc Devices.h
  15498. æT Function
  15499. æTN A005
  15500. æD #pragma parameter __D0 PBStatusSync(__A0)
  15501. pascal OSErr PBStatusSync(ParmBlkPtr paramBlock)
  15502.     = 0xA005; 
  15503. æDT #pragma parameter __D0 myVariable = PBStatusSync()(__A0);
  15504. æMM
  15505. æRI II-186
  15506. æC 
  15507. Trap macro    _Status
  15508.  
  15509. Parameter block
  15510.   -->    12    ioCompletion  pointer
  15511.   <--    16    ioResult      word
  15512.   -->    22    ioVRefNum     word
  15513.   -->    24    ioRefNum      word
  15514.   -->    26    csCode        word
  15515.   <--    28    csParam       record
  15516.  
  15517. PBStatus returns status information about the device driver having the reference
  15518. number ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of
  15519. information returned is specified by csCode, and the information itself begins at
  15520. csParam. The values passed in csCode and csParam depend on the driver being called.
  15521.  
  15522. Result codes    noErr           No error
  15523.                 badUnitErr      Bad reference number
  15524.                 notOpenErr      Driver isn’t open
  15525.                 unitEmptyErr    Bad reference number
  15526.                 statusErr       Driver can’t respond to this Status call
  15527.  
  15528. æKY PBStatusAsync
  15529. æFc Devices.h
  15530. æT Function
  15531. æTN A405
  15532. æD #pragma parameter __D0 PBStatusAsync(__A0)
  15533. pascal OSErr PBStatusAsync(ParmBlkPtr paramBlock)
  15534.     = 0xA405; 
  15535. æDT #pragma parameter __D0 myVariable = PBStatusAsync()(__A0);
  15536. æMM
  15537. æRI II-186
  15538. æC 
  15539. Trap macro    _Status
  15540.  
  15541. Parameter block
  15542.   -->    12    ioCompletion  pointer
  15543.   <--    16    ioResult      word
  15544.   -->    22    ioVRefNum     word
  15545.   -->    24    ioRefNum      word
  15546.   -->    26    csCode        word
  15547.   <--    28    csParam       record
  15548.  
  15549. PBStatus returns status information about the device driver having the reference
  15550. number ioRefNum; the drive number, if any, is specified by ioVRefNum. The type of
  15551. information returned is specified by csCode, and the information itself begins at
  15552. csParam. The values passed in csCode and csParam depend on the driver being called.
  15553.  
  15554. Result codes    noErr           No error
  15555.                 badUnitErr      Bad reference number
  15556.                 notOpenErr      Driver isn’t open
  15557.                 unitEmptyErr    Bad reference number
  15558.                 statusErr       Driver can’t respond to this Status call
  15559.  
  15560. æKY PBKillIO
  15561. æFc Devices.h
  15562. æT Function
  15563. æD pascal OSErr PBKillIO(ParmBlkPtr paramBlock,Boolean async); 
  15564. æDT OSErr myVariable = PBKillIO((ParmBlkPtr) paramBlock,(Boolean) async);
  15565. æRI II-187
  15566. æC 
  15567. Trap macro    _KillIO
  15568.  
  15569. Parameter block
  15570.   -->    12    ioCompletion  pointer
  15571.   <--    16    ioResult      word
  15572.   -->    24    ioRefNum      word
  15573.  
  15574. PBKillIO stops any current I/O request being processed, and removes all pending I/O
  15575. requests from the I/O queue of the device driver having the reference number ioRefNum.
  15576. The completion routine of each pending I/O request is called, with the ioResult field
  15577. of each request equal to the result code abortErr.
  15578.  
  15579. Result codes    noErr           No error
  15580.                 badUnitErr      Bad reference number
  15581.                 unitEmptyErr    Bad reference number
  15582.  
  15583. æKY PBKillIOSync
  15584. æFc Devices.h
  15585. æT Function
  15586. æTN A006
  15587. æD #pragma parameter __D0 PBKillIOSync(__A0)
  15588. pascal OSErr PBKillIOSync(ParmBlkPtr paramBlock)
  15589.     = 0xA006; 
  15590. æDT #pragma parameter __D0 myVariable = PBKillIOSync()(__A0);
  15591. æRI II-187
  15592. æC 
  15593. Trap macro    _KillIO
  15594.  
  15595. Parameter block
  15596.   -->    12    ioCompletion  pointer
  15597.   <--    16    ioResult      word
  15598.   -->    24    ioRefNum      word
  15599.  
  15600. PBKillIO stops any current I/O request being processed, and removes all pending I/O
  15601. requests from the I/O queue of the device driver having the reference number ioRefNum.
  15602. The completion routine of each pending I/O request is called, with the ioResult field
  15603. of each request equal to the result code abortErr.
  15604.  
  15605. Result codes    noErr           No error
  15606.                 badUnitErr      Bad reference number
  15607.                 unitEmptyErr    Bad reference number
  15608.  
  15609. æKY PBKillIOAsync
  15610. æFc Devices.h
  15611. æT Function
  15612. æTN A406
  15613. æD #pragma parameter __D0 PBKillIOAsync(__A0)
  15614. pascal OSErr PBKillIOAsync(ParmBlkPtr paramBlock)
  15615.     = 0xA406; 
  15616. æDT #pragma parameter __D0 myVariable = PBKillIOAsync()(__A0);
  15617. æRI II-187
  15618. æC 
  15619. Trap macro    _KillIO
  15620.  
  15621. Parameter block
  15622.   -->    12    ioCompletion  pointer
  15623.   <--    16    ioResult      word
  15624.   -->    24    ioRefNum      word
  15625.  
  15626. PBKillIO stops any current I/O request being processed, and removes all pending I/O
  15627. requests from the I/O queue of the device driver having the reference number ioRefNum.
  15628. The completion routine of each pending I/O request is called, with the ioResult field
  15629. of each request equal to the result code abortErr.
  15630.  
  15631. Result codes    noErr           No error
  15632.                 badUnitErr      Bad reference number
  15633.                 unitEmptyErr    Bad reference number
  15634.  
  15635.  
  15636. æKY Dialogs.h
  15637. æKL Alert
  15638. CautionAlert
  15639. CloseDialog
  15640. CouldAlert
  15641. CouldDialog
  15642. DialogSelect
  15643. DisposDialog
  15644. DisposeDialog
  15645. DlgCopy
  15646. DlgCut
  15647. DlgDelete
  15648. DlgPaste
  15649. DrawDialog
  15650. ErrorSound
  15651. findditem
  15652. FindDItem
  15653. FreeAlert
  15654. FreeDialog
  15655. GetAlrtStage
  15656. GetDItem
  15657. getitext
  15658. GetIText
  15659. GetNewDialog
  15660. HideDItem
  15661. InitDialogs
  15662. IsDialogEvent
  15663. ModalDialog
  15664. newcdialog
  15665. NewCDialog
  15666. newdialog
  15667. NewDialog
  15668. NoteAlert
  15669. paramtext
  15670. ParamText
  15671. ResetAlrtStage
  15672. SelIText
  15673. SetDAFont
  15674. SetDItem
  15675. setitext
  15676. SetIText
  15677. ShowDItem
  15678. StopAlert
  15679. UpdateDialog
  15680. UpdtDialog
  15681.  
  15682. AlertTemplate
  15683. AlertTHndl
  15684. AlertTPtr
  15685. btnCtrl
  15686. cancel
  15687. cautionIcon
  15688. chkCtrl
  15689. ctrlItem
  15690. DialogPeek
  15691. DialogPtr
  15692. DialogRecord
  15693. DialogTemplate
  15694. DialogTHndl
  15695. DialogTPtr
  15696. editText
  15697. iconItem
  15698. itemDisable
  15699. ModalFilterProcPtr
  15700. noteIcon
  15701. ok
  15702. picItem
  15703. radCtrl
  15704. resCtrl
  15705. ResumeProcPtr
  15706. SoundProcPtr
  15707. StageList
  15708. statText
  15709. stopIcon
  15710. userItem
  15711.  
  15712. æKY ctrlItem
  15713. æFc Dialogs.h
  15714. æT 
  15715. æD     ctrlItem = 4,
  15716. æC 
  15717.  
  15718. æKY btnCtrl
  15719. æFc Dialogs.h
  15720. æT 
  15721. æD     btnCtrl = 0,
  15722. æC 
  15723.  
  15724. æKY chkCtrl
  15725. æFc Dialogs.h
  15726. æT 
  15727. æD     chkCtrl = 1,
  15728. æC 
  15729.  
  15730. æKY radCtrl
  15731. æFc Dialogs.h
  15732. æT 
  15733. æD     radCtrl = 2,
  15734. æC 
  15735.  
  15736. æKY resCtrl
  15737. æFc Dialogs.h
  15738. æT 
  15739. æD     resCtrl = 3,
  15740. æC 
  15741.  
  15742. æKY statText
  15743. æFc Dialogs.h
  15744. æT 
  15745. æD     statText = 8,
  15746. æC 
  15747.  
  15748. æKY editText
  15749. æFc Dialogs.h
  15750. æT 
  15751. æD     editText = 16,
  15752. æC 
  15753.  
  15754. æKY iconItem
  15755. æFc Dialogs.h
  15756. æT 
  15757. æD     iconItem = 32,
  15758. æC 
  15759.  
  15760. æKY picItem
  15761. æFc Dialogs.h
  15762. æT 
  15763. æD     picItem = 64,
  15764. æC 
  15765.  
  15766. æKY userItem
  15767. æFc Dialogs.h
  15768. æT 
  15769. æD     userItem = 0,
  15770. æC 
  15771.  
  15772. æKY itemDisable
  15773. æFc Dialogs.h
  15774. æT 
  15775. æD     itemDisable = 128,
  15776. æC 
  15777.  
  15778. æKY ok
  15779. æFc Dialogs.h
  15780. æT 
  15781. æD     ok = 1,
  15782. æC 
  15783.  
  15784. æKY cancel
  15785. æFc Dialogs.h
  15786. æT 
  15787. æD     cancel = 2,
  15788. æC 
  15789.  
  15790. æKY stopIcon
  15791. æFc Dialogs.h
  15792. æT 
  15793. æD     stopIcon = 0,
  15794. æC 
  15795.  
  15796. æKY noteIcon
  15797. æFc Dialogs.h
  15798. æT 
  15799. æD     noteIcon = 1,
  15800. æC 
  15801.  
  15802. æKY cautionIcon
  15803. æFc Dialogs.h
  15804. æT 
  15805. æD     cautionIcon = 2,
  15806. æC 
  15807.  
  15808. æKY StageList
  15809. æFc Dialogs.h
  15810. æT typedef
  15811. æD typedef short StageList;
  15812. æC »Alert Templates in Memory
  15813.  
  15814. The data structure of an alert template is as follows:
  15815.  
  15816. TYPE AlertTemplate = RECORD
  15817.                        boundsRect:  Rect;      {becomes window's portRect}
  15818.                        itemsID:     INTEGER;   {resource ID of item list}
  15819.                        stages:      StageList  {alert stage information}
  15820.                      END;
  15821.  
  15822. BoundsRect is the rectangle that becomes the portRect of the window's grafPort. The
  15823. itemsID field contains the resource ID of the item list for the alert.
  15824.  
  15825. The information in the stages field determines exactly what should happen at each
  15826. stage of the alert. It's packed into a word that has the following structure:
  15827.  
  15828. TYPE StageList = PACKED RECORD
  15829.                    boldItm4:  0..1;     {default button item number minus 1}
  15830.                    boxDrwn4:  BOOLEAN;  {TRUE if alert box to be drawn}
  15831.                    sound4:    0..3      {sound number}
  15832.                    boldItm3:  0..1; 
  15833.                    boxDrwn3:  BOOLEAN; 
  15834.                    sound3:    0..3 
  15835.                    boldItm2:  0..1; 
  15836.                    boxDrwn2:  BOOLEAN; 
  15837.                    sound2:    0..3 
  15838.                    boldItm1:  0..1; 
  15839.                    boxDrwn1:  BOOLEAN; 
  15840.                    sound1:    0..3 
  15841.                  END;
  15842.  
  15843. Notice that the information is stored in reverse order—for the fourth stage first,
  15844. and for the first stage last.
  15845.  
  15846. The boldItm field indicates which button should be the default button (and therefore
  15847. boldly outlined in the alert box). If the first two items in the alert’s item list
  15848. are the OK button and the Cancel button, respectively, 0 will refer to the OK button
  15849. and 1 to the Cancel button. The reason for this is that the value of boldItm plus 1
  15850. is interpreted as an item number, and normally items 1 and 2 are the OK and Cancel
  15851. buttons, respectively. Whatever the item having the corresponding item number happens
  15852. to be, a bold rounded-corner rectangle will be drawn outside its display rectangle.
  15853.  
  15854. Note:  When deciding where to place items in an alert box, be sure to allow
  15855.        room for any bold outlines that may be drawn.
  15856.  
  15857. The boxDrwn field is TRUE if the alert box is to be drawn.
  15858.  
  15859. The sound field specifies which sound should be emitted at this stage of the alert,
  15860. with a number from 0 to 3 that’s passed to the current sound procedure. You can call
  15861. ErrorSound to specify your own sound procedure; if you don’t, the standard sound
  15862. procedure will be used (as described earlier in the “Alerts” section).
  15863.  
  15864. You access the alert template by converting the handle returned by the Resource
  15865. Manager to a template handle:
  15866.  
  15867. TYPE  AlertTHndl = ^AlertTPtr;
  15868.       AlertTPtr  = ^AlertTemplate;
  15869.  
  15870. Assembly-language note:  Rather than offsets into the fields of the StageList
  15871.                          data structure, there are masks for accessing the
  15872.                          information stored for an alert stage in a stages
  15873.                          word; they’re listed in the summary at the end of
  15874.                          this chapter.
  15875.  
  15876. æKY DialogPtr
  15877. æFc Dialogs.h
  15878. æT typedef
  15879. æD typedef WindowPtr DialogPtr;
  15880. æC 
  15881. »Dialog Pointers
  15882.  
  15883. There are two types of dialog pointer, DialogPtr and DialogPeek, analogous to the
  15884. window pointer types WindowPtr and WindowPeek. Most programmers will only need to use
  15885. DialogPtr.
  15886.  
  15887. The Dialog Manager defines the following type of dialog pointer:
  15888.  
  15889. TYPE  DialogPtr = WindowPtr;
  15890.  
  15891. It can do this because the first field of a dialog record contains the window record
  15892. for the dialog window. This type of pointer can be used to access fields of the
  15893. window record or can be passed to Window Manager routines that expect window pointers
  15894. as parameters. Since the WindowPtr data type is itself defined as GrafPtr, this type
  15895. of dialog pointer can also be used to access fields of the dialog window’s grafPort
  15896. or passed to QuickDraw routines that expect pointers to grafPorts as parameters.
  15897.  
  15898. For programmers who want to access dialog record fields beyond the window record, the
  15899. Dialog Manager also defines the following type of dialog pointer:
  15900.  
  15901. TYPE  DialogPeek = ^DialogRecord;
  15902.  
  15903. Assembly-language note:  From assembly language, of course, there’s no
  15904.                          type checking on pointers, and the two types
  15905.                          of pointer are equal.
  15906.  
  15907. _______________________________________________________________________________
  15908.  
  15909. »The DialogRecord Data Type
  15910.  
  15911. For those who want to know more about the data structure of a dialog record, the
  15912. exact structure is given here.
  15913.  
  15914. TYPE  DialogRecord = RECORD
  15915.                        window:     WindowRecord;  {dialog window}
  15916.                        items:      Handle;        {item list}
  15917.                        textH:      TEHandle;      {current editText item}
  15918.                        editField:  INTEGER;       {editText item number minus 1}
  15919.                        editOpen:   INTEGER;       {used internally}
  15920.                        aDefItem:   INTEGER        {default button item number}
  15921.                      END;
  15922.  
  15923. The window field contains the window record for the dialog window. The items field
  15924. contains a handle to the item list used for the dialog. (Remember that after reading
  15925. an item list from a resource file, the Dialog Manager makes a copy of it and uses
  15926. that copy.)
  15927.  
  15928. Note:  To get or change information about an item in a dialog, you pass the
  15929.        dialog pointer and the item number to a Dialog Manager procedure.
  15930.        You’ll never access information directly through the handle to the
  15931.        item list.
  15932.  
  15933. The Dialog Manager uses the next three fields when there are one or more editText
  15934. items in the dialog. If there’s more than one such item, these fields apply to the
  15935. one that currently is selected or displays the insertion point. The textH field
  15936. contains the handle to the edit record used by TextEdit. EditField is 1 less than the
  15937. item number of the current editText item, or –1 if there’s no editText item in the
  15938. dialog. The editOpen field is used internally by the Dialog Manager.
  15939.  
  15940. Note:  Actually, a single edit record is shared by all editText items; any
  15941.        changes you make to it will apply to all such items. See the TextEdit
  15942.        chapter for details about what kinds of changes you can make.
  15943.  
  15944. The aDefItem field is used for modal dialogs and alerts, which are treated internally
  15945. as special modal dialogs. It contains the item number of the default button. The
  15946. default button for a modal dialog is the first item in the item list, so this field
  15947. contains 1 for modal dialogs. The default button for an alert is specified in the
  15948. alert template; see the following section for more information.
  15949.  
  15950. _______________________________________________________________________________
  15951.  
  15952. »THE DRAWING ENVIRONMENT:  GRAFPORT
  15953. _______________________________________________________________________________
  15954.  
  15955. A grafPort is a complete drawing environment that defines where and how graphic
  15956. operations will take place. You can have many grafPorts open at once, and each one
  15957. will have its own coordinate system, drawing pattern, background pattern, pen size
  15958. and location, character font and style, and bit map in which drawing takes place. You
  15959. can instantly switch from one port to another. GrafPorts are the structures upon
  15960. which a program builds windows, which are fundamental to the Macintosh “overlapping
  15961. windows” user interface. Besides being used for windows on the screen, grafPorts are
  15962. used for printing and for off-screen drawing.
  15963.  
  15964. A grafPort is defined as follows:
  15965.  
  15966. TYPE  GrafPtr   =  ^GrafPort;
  15967.       GrafPort  =  RECORD
  15968.                      device:      INTEGER;    {device-specific information}
  15969.                      portBits:    BitMap;     {grafPort's bit map}
  15970.                      portRect:    Rect;       {grafPort's rectangle}
  15971.                      visRgn:      RgnHandle;  {visible region}
  15972.                      clipRgn:     RgnHandle;  {clipping region}
  15973.                      bkPat:       Pattern;    {background pattern}
  15974.                      fillPat:     Pattern;    {fill pattern}
  15975.                      pnLoc:       Point;      {pen location}
  15976.                      pnSize:      Point;      {pen size}
  15977.                      pnMode:      INTEGER;    {pen's transfer mode}
  15978.                      pnPat:       Pattern;    {pen pattern}
  15979.                      pnVis:       INTEGER;    {pen visibility}
  15980.                      txFont:      INTEGER;    {font number for text}
  15981.                      txFace:      Style;      {text's character style}
  15982.                      txMode:      INTEGER;    {text's transfer mode}
  15983.                      txSize:      INTEGER;    {font size for text}
  15984.                      spExtra:     Fixed;      {extra space}
  15985.                      fgColor:     LONGINT;    {foreground color}
  15986.                      bkColor:     LONGINT;    {background color}
  15987.                      colrBit:     INTEGER;    {color bit}
  15988.                      patStretch:  INTEGER;    {used internally}
  15989.                      picSave:     Handle;     {picture being saved}
  15990.                      rgnSave:     Handle;     {region being saved}
  15991.                      polySave:    Handle;     {polygon being saved}
  15992.                      grafProcs:   QDProcsPtr  {low-level drawing routines}
  15993.                    END;
  15994.  
  15995. Note that picSave is a Handle used internally by QuickDraw while it is saving a
  15996. picture, and rgnSave and polySave are used by QuickDraw as flags; they are set to “1”
  15997. when the corresponding action is taking place.
  15998.  
  15999. All QuickDraw operations refer to grafPorts via grafPtrs. (For historical reasons,
  16000. grafPort is one of the few objects in the Macintosh system software that’s referred
  16001. to by a pointer rather than a handle.)
  16002.  
  16003. Warning:  You can access all fields and subfields of a grafPort normally,
  16004.           but you should not store new values directly into them. QuickDraw
  16005.           has routines for altering all fields of a grafPort, and using
  16006.           these routines ensures that changing a grafPort produces no
  16007.           unusual side effects.
  16008.  
  16009. The device field of a grafPort contains device-specific information that’s used by
  16010. the Font Manager to achieve the best possible results when drawing text in the grafPort.
  16011. There may be physical differences in the same logical font for different output
  16012. devices, to ensure the highest-quality printing on the device being used. The default
  16013. value of the device field is 0, for best results on output to the screen. For more
  16014. information, see the Font Manager chapter.
  16015.  
  16016. The portBits field is the bit map that points to the bit image to be used by the
  16017. grafPort. The default bit map uses the entire screen as its bit image. The bit map
  16018. may be changed to indicate a different structure in memory:  All graphics routines
  16019. work in exactly the same way regardless of whether their effects are visible on the
  16020. screen. A program can, for example, prepare an image to be printed on a printer
  16021. without ever displaying the image on the screen, or develop a picture in an off-screen
  16022. bit map before transferring it to the screen. The portBits.bounds rectangle determines
  16023. the coordinate system of the grafPort; all other coordinates in the grafPort are
  16024. expressed in this system.
  16025.  
  16026. The portRect field is a rectangle that defines a subset of the bit map that will be
  16027. used for drawing:  All drawing done by the application occurs inside the portRect.
  16028. Its coordinates are in the coordinate system defined by the portBits.bounds rectangle.
  16029. The portRect usually falls within the portBits.bounds rectangle, but it’s not required
  16030. to do so. The portRect usually defines the “writable” interior area of a window,
  16031. document, or other object on the screen.
  16032.  
  16033. The visRgn field is manipulated by the Window Manager; you will normally never change
  16034. a grafPort’s visRgn. It indicates the region of the grafPort that’s actually visible
  16035. on the screen, that is, the part of the window that’s not covered by other windows.
  16036. For example, if you move one window in front of another, the Window Manager logically
  16037. removes the area of overlap from the visRgn of the window in back. When you draw into
  16038. the back window, whatever’s being drawn is clipped to the visRgn so that it doesn’t
  16039. run over onto the front window. The default visRgn is set to the portRect.
  16040.  
  16041. The clipRgn is the grafPort’s clipping region, an arbitrary region that you can use
  16042. to limit drawing to any region within the portRect. If, for example, you want to draw
  16043. a half circle on the screen, you can set the clipRgn to half the square that would
  16044. enclose the whole circle, and then draw the whole circle. Only the half within the
  16045. clipRgn will actually be drawn in the grafPort. The default clipRgn is set arbitrarily
  16046. large, you have full control over its setting; as a matter of recommended programming
  16047. practice, it is advisable to make the default clipRgn rectangle smaller.
  16048.  
  16049. Figure 10 illustrates a typical bit map (as defined by portBits), portRect, visRgn,
  16050. and clipRgn.
  16051.  
  16052. •••Refer to Figure 10.•••
  16053.  
  16054. Figure 10–GrafPort Regions
  16055.  
  16056. The bkPat and fillPat fields of a grafPort contain patterns used by certain QuickDraw
  16057. routines. BkPat is the “background” pattern that’s used when an area is erased or
  16058. when bits are scrolled out of it. When asked to fill an area with a specified pattern,
  16059. QuickDraw stores the given pattern in the fillPat field and then calls a low-level
  16060. drawing routine that gets the pattern from that field. The various graphic operations
  16061. are discussed in detail later in the descriptions of individual QuickDraw routines.
  16062.  
  16063. Of the next ten fields, the first five determine characteristics of the graphics pen
  16064. and the last five determine characteristics of any text that may be drawn; these are
  16065. described in separate sections below.
  16066.  
  16067. The fgColor, bkColor, and colrBit fields contain values related to drawing in color.
  16068. FgColor is the grafPort’s foreground color and bkColor is its background color.
  16069. ColrBit tells the color imaging software which plane of the color picture to draw
  16070. into. For more information, see “Drawing in Color” in the section “General Discussion
  16071. of Drawing”.
  16072.  
  16073. The patStretch field is used during output to a printer to expand patterns if necessary.
  16074. The application should not change its value.
  16075.  
  16076. The picSave, rgnSave, and polySave fields reflect the state of picture, region, and
  16077. polygon definition, respectively. The application shouldn’t be concerned about exactly
  16078. what information the handle, if any, leads to; you may, however, save the current
  16079. value of rgnSave, set the field to NIL to disable the region definition, and later
  16080. restore it to the saved value to resume the region definition. The picSave and polySave
  16081. fields work similarly for pictures and polygons.
  16082.  
  16083. Finally, the grafProcs field may point to a special data structure that the application
  16084. stores into if it wants to customize QuickDraw drawing routines or use QuickDraw in
  16085. other advanced, highly specialized ways (see “Customizing QuickDraw Operations”). If
  16086. grafProcs is NIL, QuickDraw responds in the standard ways described in this chapter.
  16087.  
  16088. _______________________________________________________________________________
  16089.  
  16090. »Pen Characteristics
  16091.  
  16092. The pnLoc, pnSize, pnMode, pnPat, and pnVis fields of a grafPort deal with the graphics
  16093. “pen”. Each grafPort has one and only one such pen, which is used for drawing lines,
  16094. shapes, and text. The pen has four characteristics:  a location, a size (height and
  16095. width), a drawing mode, and a drawing pattern (see Figure
  16096. 11).
  16097.  
  16098. •••Refer to Figure 11.•••
  16099.  
  16100. Figure 11–A Graphics Pen
  16101.  
  16102. The pnLoc field specifies the point where QuickDraw will begin drawing the next line,
  16103. shape, or character. It can be anywhere on the coordinate plane:  There are no restrictions
  16104. on the movement or placement of the pen. Remember that the pen location is a point in
  16105. the grafPort’s coordinate system, not a pixel in a bit image. The top left corner of
  16106. the pen is at the pen location; the pen hangs below and to the right of this point.
  16107.  
  16108. The pen is rectangular in shape, and its width and height are specified by pnSize.
  16109. The default size is a 1-by-1-bit square; the width and height can range from (0,0) to
  16110. (30000,30000). If either the pen width or the pen height is less than 1, the pen will
  16111. not draw.
  16112.  
  16113. The pnMode and pnPat fields of a grafPort determine how the bits under the pen are
  16114. affected when lines or shapes are drawn. The pnPat is a pattern that’s used like the
  16115. “ink” in the pen. This pattern, like all other patterns drawn in the grafPort, is
  16116. always aligned with the port’s coordinate system:  The top left corner of the pattern
  16117. is aligned with the top left corner of the portRect, so that adjacent areas of the
  16118. same pattern will blend into a continuous, coordinated pattern.
  16119.  
  16120. The pnMode field determines how the pen pattern is to affect what’s already in the
  16121. bit image when lines or shapes are drawn. When the pen draws, QuickDraw first determines
  16122. what bits in the bit image will be affected and finds their corresponding bits in the
  16123. pattern. It then does a bit-by-bit comparison based on the pen mode, which specifies
  16124. one of eight Boolean operations to perform. The resulting bit is stored into its
  16125. proper place in the bit image. The pen modes are described under “Transfer Modes” in
  16126. the section “General Discussion of Drawing”.
  16127.  
  16128. The pnVis field determines the pen’s visibility, that is, whether it draws on the
  16129. screen. For more information, see the descriptions of HidePen and ShowPen under “Pen
  16130. and Line-Drawing Routines” in the “QuickDraw Routines” section.
  16131.  
  16132. _______________________________________________________________________________
  16133.  
  16134. »Text Characteristics
  16135.  
  16136. The txFont, txFace, txMode, txSize, and spExtra fields of a grafPort determine how
  16137. text will be drawn—the font, style, and size of characters and how they will be
  16138. placed in the bit image. QuickDraw can draw characters as quickly and easily as it
  16139. draws lines and shapes, and in many prepared fonts. Font means the complete set of
  16140. characters of one typeface. The characters may be drawn in any size and character
  16141. style (that is, with stylistic variations such as bold, italic, and underline).
  16142. Figure 12 shows two characters drawn by QuickDraw and some terms associated with
  16143. drawing text.
  16144.  
  16145. •••Refer to Figure 12.•••
  16146.  
  16147. Figure 12–QuickDraw Characters
  16148.  
  16149. Text is drawn with the base line positioned at the pen location.
  16150.  
  16151. The txFont field is a font number that identifies the character font to be used in
  16152. the grafPort. The font number 0 represents the system font. For more information
  16153. about the system font, the other font numbers recognized by the Font Manager, and the
  16154. construction, layout, and loading of fonts, see the Font Manager chapter.
  16155.  
  16156. A character font is defined as a collection of images that make up the individual
  16157. characters of the font. The characters can be of unequal widths, and they’re not
  16158. restricted to their “cells”:  The lower curl of a lowercase j, for example, can
  16159. stretch back under the previous character (typographers call this kerning). A font
  16160. can consist of up to 255 distinct characters, yet not all characters need to be
  16161. defined in a single font. In addition, each font contains a missing symbol to be
  16162. drawn in case of a request to draw a character that’s missing from the font.
  16163.  
  16164. The txFace field controls the character style of the text with values from the set
  16165. defined by the Style data type:
  16166.  
  16167. TYPE  StyleItem  = (bold,italic,underline,outline,shadow,condense,extend);
  16168.       Style      = SET OF StyleItem;
  16169.  
  16170. Assembly-language note:  In assembly language, this set is stored as a word
  16171.                          whose low-order byte contains bits representing the
  16172.                          style. The bit numbers are specified by the following
  16173.                          global constants:
  16174.  
  16175.                            boldBit       .EQU    0
  16176.                            italicBit     .EQU    1
  16177.                            ulineBit      .EQU    2
  16178.                            outlineBit    .EQU    3
  16179.                            shadowBit     .EQU    5
  16180.                            extendBit     .EQU    6
  16181.  
  16182.                          If all bits are 0, it represents the plain character
  16183.                          style.
  16184.  
  16185. You can apply stylistic variations either alone or in combination; Figure 13 illustrates
  16186. some as applied to the Geneva font. Most combinations usually look good only for
  16187. large font sizes.
  16188.  
  16189. •••Refer to Figure 13.•••
  16190.  
  16191. Figure 13–Stylistic Variations
  16192.  
  16193. If you specify bold, each character is repeatedly drawn one bit to the right an
  16194. appropriate number of times for extra thickness.
  16195.  
  16196. Italic adds an italic slant to the characters. Character bits above the base line are
  16197. skewed right; bits below the base line are skewed left.
  16198.  
  16199. Underline draws a line below the base line of the characters. If part of a character
  16200. descends below the base line (as “y” in Figure 13), the underline
  16201. isn’t drawn through the pixel on either side of the descending part.
  16202.  
  16203. Outline makes a hollow, outlined character rather than a solid one. Shadow also makes
  16204. an outlined character, but the outline is thickened below and to the right of the
  16205. character to achieve the effect of a shadow. If you specify bold along with outline
  16206. or shadow, the hollow part of the character is widened.
  16207.  
  16208. Condense and extend affect the horizontal distance between all characters, including
  16209. spaces. Condense decreases the distance between characters and extend increases it,
  16210. by an amount that the Font Manager determines is appropriate.
  16211.  
  16212. The txMode field controls the way characters are placed in the bit image. It functions
  16213. much like a pnMode:  When a character is drawn, QuickDraw determines which bits in
  16214. the bit image will be affected, does a bit-by-bit comparison based on the mode, and
  16215. stores the resulting bits into the bit image. These modes are described under “Transfer
  16216. Modes” in the section “General Discussion of Drawing”. Only three of them—srcOr,
  16217. srcXor, and srcBic—should be used for drawing text.
  16218.  
  16219. Note:  If you use scrCopy, some extra blank space will be appended at the
  16220.        end of the text.
  16221.  
  16222. The txSize field specifies the font size in points (where “point” is a typographical
  16223. term meaning approximately 1/72 inch). Any size from 1 to 127 points may be specified.
  16224. If the Font Manager doesn’t have the font in a specified size, it will scale a size
  16225. it does have as necessary to produce the size desired. A value of 0 in this field
  16226. represents the system font size (12 points).
  16227.  
  16228. Finally, the spExtra field is useful when a line of characters is to be drawn justified
  16229. such that it’s aligned with both a left and a right margin (sometimes called “full
  16230. justification”). SpExtra contains a fixed-point number equal to the average number of
  16231. pixels by which each space character should be widened to fill out the line. The
  16232. Fixed data type is described in the Macintosh Memory Management:  An Introduction
  16233. chapter.
  16234.  
  16235. _______________________________________________________________________________
  16236.  
  16237. »COORDINATES IN GRAFPORTS
  16238. _______________________________________________________________________________
  16239.  
  16240. Each grafPort has its own local coordinate system. All fields in the grafPort are
  16241. expressed in these coordinates, and all calculations and actions performed in QuickDraw
  16242. use the local coordinate system of the currently selected port.
  16243.  
  16244. Two things are important to remember:
  16245.  
  16246.   •  Each grafPort maps a portion of the coordinate plane into a similarly-
  16247.      sized portion of a bit image.
  16248.   •  The portBits.bounds rectangle defines the local coordinates for a grafPort.
  16249.  
  16250. The top left corner of portBits.bounds is always aligned around the first bit in the
  16251. bit image; the coordinates of that corner “anchor” a point on the grid to that bit in
  16252. the bit image. This forms a common reference point for multiple grafPorts that use
  16253. the same bit image (such as the screen); given a portBits.bounds rectangle for each
  16254. port, you know that their top left corners coincide.
  16255.  
  16256. The relationship between the portBits.bounds and portRect rectangles is very important:
  16257.  The portBits.bounds rectangle establishes a coordinate system for the port, and the
  16258. portRect rectangle indicates the section of the coordinate plane (and thus the bit
  16259. image) that will be used for drawing. The portRect usually falls inside the portBits.bounds
  16260. rectangle, but it’s not required to do so.
  16261.  
  16262. When a new grafPort is created, its bit map is set to point to the entire screen, and
  16263. both the portBits.bounds and the portRect are set to rectangles enclosing the screen.
  16264. The point (0,0) corresponds to the screen’s top left corner.
  16265.  
  16266. You can redefine the local coordinates of the top left corner of the grafPort’s
  16267. portRect, using the SetOrigin procedure. This offsets the coordinates of the grafPort’s
  16268. portBits.bounds rectangle, recalculating the coordinates of all points in the grafPort
  16269. to be relative to the new corner coordinates. For example, consider these procedure
  16270. calls:
  16271.  
  16272.   SetPort(gamePort);
  16273.   SetOrigin(90,80)
  16274.  
  16275. The call to SetPort sets the current grafPort to gamePort; the call to SetOrigin
  16276. changes the local coordinates of the top left corner of that port’s portRect to
  16277. (90,80) (see Figure 14).
  16278.  
  16279. •••Refer to Figure 14.•••
  16280.  
  16281. Figure 14–Changing Local Coordinates
  16282.  
  16283. This offsets the coordinates of the following elements:
  16284.  
  16285.   gamePort^.portBits.bounds
  16286.   gamePort^.portRect
  16287.   gamePort^.visRgn
  16288.  
  16289. These three elements are always kept “in sync”.
  16290.  
  16291. Notice that when the local coordinates of a grafPort are offset, the grafPort’s
  16292. clipRgn and pen location are not offset. A good way to think of it is that the port’s
  16293. structure “sticks” to the screen, while the document in the grafPort
  16294. (along with the pen and clipRgn) “sticks” to the coordinate system. For example, in
  16295. Figure 14, before SetOrigin, the visRgn and clipRgn are the same as the portRect.
  16296. After the SetOrigin call, the locations of portBits.bounds, portRect, and visRgn do
  16297. not change on the screen; their coordinates are simply offset. As always, the top
  16298. left corner of portBits.bounds remains “anchored” around the first bit in the bit
  16299. image (the first pixel on the screen); the image on the screen doesn’t move as a
  16300. result of SetOrigin. However, the pen location and clipRgn do move on the screen; the
  16301. top left corner of the clipRgn is still
  16302. (100,100), but this location has moved down and to the right, and the pen has similarly
  16303. moved.
  16304.  
  16305. If you’re moving, comparing, or otherwise dealing with mathematical items in different
  16306. grafPorts (for example, finding the intersection of two regions in two different
  16307. grafPorts), you must adjust to a common coordinate system before you perform the
  16308. operation. A QuickDraw procedure, LocalToGlobal, lets you convert a point’s local
  16309. coordinates to a global coordinate system where the top left corner of the bit image
  16310. is (0,0); by converting the various local coordinates to global coordinates, you can
  16311. compare and mix them with confidence. For more information, see the description of
  16312. LocaltoGlobal under “Calculations with Points” in the “QuickDraw Routines” section.
  16313.  
  16314. æKY ResumeProcPtr
  16315. æFc Dialogs.h
  16316. æT typedef
  16317. æD typedef pascal void (*ResumeProcPtr)(void);
  16318. æC 
  16319.  
  16320. æKY SoundProcPtr
  16321. æFc Dialogs.h
  16322. æT typedef
  16323. æD typedef pascal void (*SoundProcPtr)(void);
  16324. æC 
  16325.  
  16326. æKY ModalFilterProcPtr
  16327. æFc Dialogs.h
  16328. æT typedef
  16329. æD typedef pascal Boolean (*ModalFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
  16330. æC 
  16331.  
  16332. æKY DialogRecord
  16333. DialogPeek
  16334. æFc Dialogs.h
  16335. æT struct
  16336. æD struct DialogRecord {
  16337.     WindowRecord window;
  16338.     Handle items;
  16339.     TEHandle textH;
  16340.     short editField;
  16341.     short editOpen;
  16342.     short aDefItem;
  16343. };
  16344.  
  16345. typedef struct DialogRecord DialogRecord;
  16346. typedef DialogRecord *DialogPeek;
  16347. æC 
  16348.  
  16349. »The DialogRecord Data Type
  16350.  
  16351. For those who want to know more about the data structure of a dialog record, the
  16352. exact structure is given here.
  16353.  
  16354. TYPE  DialogRecord = RECORD
  16355.                        window:     WindowRecord;  {dialog window}
  16356.                        items:      Handle;        {item list}
  16357.                        textH:      TEHandle;      {current editText item}
  16358.                        editField:  INTEGER;       {editText item number minus 1}
  16359.                        editOpen:   INTEGER;       {used internally}
  16360.                        aDefItem:   INTEGER        {default button item number}
  16361.                      END;
  16362.  
  16363. The window field contains the window record for the dialog window. The items field
  16364. contains a handle to the item list used for the dialog. (Remember that after reading
  16365. an item list from a resource file, the Dialog Manager makes a copy of it and uses
  16366. that copy.)
  16367.  
  16368. Note:  To get or change information about an item in a dialog, you pass the
  16369.        dialog pointer and the item number to a Dialog Manager procedure.
  16370.        You’ll never access information directly through the handle to the
  16371.        item list.
  16372.  
  16373. The Dialog Manager uses the next three fields when there are one or more editText
  16374. items in the dialog. If there’s more than one such item, these fields apply to the
  16375. one that currently is selected or displays the insertion point. The textH field
  16376. contains the handle to the edit record used by TextEdit. EditField is 1 less than the
  16377. item number of the current editText item, or –1 if there’s no editText item in the
  16378. dialog. The editOpen field is used internally by the Dialog Manager.
  16379.  
  16380. Note:  Actually, a single edit record is shared by all editText items; any
  16381.        changes you make to it will apply to all such items. See the TextEdit
  16382.        chapter for details about what kinds of changes you can make.
  16383.  
  16384. The aDefItem field is used for modal dialogs and alerts, which are treated internally
  16385. as special modal dialogs. It contains the item number of the default button. The
  16386. default button for a modal dialog is the first item in the item list, so this field
  16387. contains 1 for modal dialogs. The default button for an alert is specified in the
  16388. alert template; see the following section for more information.
  16389.  
  16390. æKY DialogTemplate
  16391. DialogTPtr
  16392. DialogTHndl
  16393. æFc Dialogs.h
  16394. æT struct
  16395. æD struct DialogTemplate {
  16396.     Rect boundsRect;
  16397.     short procID;
  16398.     Boolean visible;
  16399.     Boolean filler1;
  16400.     Boolean goAwayFlag;
  16401.     Boolean filler2;
  16402.     long refCon;
  16403.     short itemsID;
  16404.     Str255 title;
  16405. };
  16406.  
  16407. typedef struct DialogTemplate DialogTemplate;
  16408. typedef DialogTemplate *DialogTPtr, **DialogTHndl;
  16409. æC 
  16410. »Dialog Templates in Memory
  16411.  
  16412. The data structure of a dialog template is as follows:
  16413.  
  16414. TYPE DialogTemplate = RECORD
  16415.                         boundsRect:  Rect;     {becomes window's portRect}
  16416.                         procID:      INTEGER;  {window definiton ID}
  16417.                         visible:     BOOLEAN;  {TRUE if visible}
  16418.                         filler1:     BOOLEAN;  {not used}
  16419.                         goAwayFlag:  BOOLEAN;  {TRUE if has go-away region}
  16420.                         filler2:     BOOLEAN;  {not used}
  16421.                         refCon:      LONGINT;  {window's reference value}
  16422.                         itemsID:     INTEGER;  {resource ID of item list}
  16423.                         title:       Str255    {window's title}
  16424.                       END;
  16425.  
  16426. The filler1 and filler2 fields are there because for historical reasons the goAwayFlag
  16427. and refCon fields have to begin on a word boundary. The itemsID field contains the
  16428. resource ID of the dialog’s item list. The other fields are the same as the parameters
  16429. of the same name in the NewDialog function; they provide information about the dialog
  16430. window.
  16431.  
  16432. You access the dialog template by converting the handle returned by the Resource
  16433. Manager to a template handle:
  16434.  
  16435. TYPE  DialogTHndl  = ^DialogTPtr;
  16436.       DialogTPtr   = ^DialogTemplate;
  16437.  
  16438. æKY AlertTemplate
  16439. AlertTPtr
  16440. AlertTHndl
  16441. æFc Dialogs.h
  16442. æT struct
  16443. æD struct AlertTemplate {
  16444.     Rect boundsRect;
  16445.     short itemsID;
  16446.     StageList stages;
  16447. };
  16448.  
  16449. typedef struct AlertTemplate AlertTemplate;
  16450. typedef AlertTemplate *AlertTPtr, **AlertTHndl;
  16451. æC 
  16452.  »Alert Templates in Memory
  16453.  
  16454. The data structure of an alert template is as follows:
  16455.  
  16456. TYPE AlertTemplate = RECORD
  16457.                        boundsRect:  Rect;      {becomes window's portRect}
  16458.                        itemsID:     INTEGER;   {resource ID of item list}
  16459.                        stages:      StageList  {alert stage information}
  16460.                      END;
  16461.  
  16462. BoundsRect is the rectangle that becomes the portRect of the window's grafPort. The
  16463. itemsID field contains the resource ID of the item list for the alert.
  16464.  
  16465. The information in the stages field determines exactly what should happen at each
  16466. stage of the alert. It's packed into a word that has the following structure:
  16467.  
  16468. TYPE StageList = PACKED RECORD
  16469.                    boldItm4:  0..1;     {default button item number minus 1}
  16470.                    boxDrwn4:  BOOLEAN;  {TRUE if alert box to be drawn}
  16471.                    sound4:    0..3      {sound number}
  16472.                    boldItm3:  0..1; 
  16473.                    boxDrwn3:  BOOLEAN; 
  16474.                    sound3:    0..3 
  16475.                    boldItm2:  0..1; 
  16476.                    boxDrwn2:  BOOLEAN; 
  16477.                    sound2:    0..3 
  16478.                    boldItm1:  0..1; 
  16479.                    boxDrwn1:  BOOLEAN; 
  16480.                    sound1:    0..3 
  16481.                  END;
  16482.  
  16483. Notice that the information is stored in reverse order—for the fourth stage first,
  16484. and for the first stage last.
  16485.  
  16486. The boldItm field indicates which button should be the default button (and therefore
  16487. boldly outlined in the alert box). If the first two items in the alert’s item list
  16488. are the OK button and the Cancel button, respectively, 0 will refer to the OK button
  16489. and 1 to the Cancel button. The reason for this is that the value of boldItm plus 1
  16490. is interpreted as an item number, and normally items 1 and 2 are the OK and Cancel
  16491. buttons, respectively. Whatever the item having the corresponding item number happens
  16492. to be, a bold rounded-corner rectangle will be drawn outside its display rectangle.
  16493.  
  16494. Note:  When deciding where to place items in an alert box, be sure to allow
  16495.        room for any bold outlines that may be drawn.
  16496.  
  16497. The boxDrwn field is TRUE if the alert box is to be drawn.
  16498.  
  16499. The sound field specifies which sound should be emitted at this stage of the alert,
  16500. with a number from 0 to 3 that’s passed to the current sound procedure. You can call
  16501. ErrorSound to specify your own sound procedure; if you don’t, the standard sound
  16502. procedure will be used (as described earlier in the “Alerts” section).
  16503.  
  16504. You access the alert template by converting the handle returned by the Resource
  16505. Manager to a template handle:
  16506.  
  16507. TYPE  AlertTHndl = ^AlertTPtr;
  16508.       AlertTPtr  = ^AlertTemplate;
  16509.  
  16510. Assembly-language note:  Rather than offsets into the fields of the StageList
  16511.                          data structure, there are masks for accessing the
  16512.                          information stored for an alert stage in a stages
  16513.                          word; they’re listed in the summary at the end of
  16514.                          this chapter.
  16515.  
  16516. æKY InitDialogs
  16517. æFc Dialogs.h
  16518. æT Function
  16519. æTN A97B
  16520. æD pascal void InitDialogs(ResumeProcPtr resumeProc)
  16521.     = 0xA97B; 
  16522. æDT InitDialogs((ResumeProcPtr) resumeProc);
  16523. æRI I-411, P-107, 112, 174
  16524. æC  
  16525. Call InitDialogs once before all other Dialog Manager routines, to initialize the
  16526. Dialog Manager. InitDialogs does the following initialization:
  16527.  
  16528.   •  It saves the pointer passed in resumeProc, if any, for access by the
  16529.      System Error Handler in case a fatal system error occurs. ResumeProc
  16530.      can be a pointer to a resume procedure, as described in the System
  16531.      Error Handler chapter, or NIL if no such procedure is desired.
  16532.  
  16533. Assembly-language note:  InitDialogs stores the address of the resume
  16534.                          procedure in a global variable named ResumeProc.
  16535.  
  16536.   •  It installs the standard sound procedure.
  16537.   •  It passes empty strings to ParamText.
  16538.  
  16539. æKY ErrorSound
  16540. æFc Dialogs.h
  16541. æT Function
  16542. æTN A98C
  16543. æD pascal void ErrorSound(SoundProcPtr soundProc)
  16544.     = 0xA98C; 
  16545. æDT ErrorSound((SoundProcPtr) soundProc);
  16546. æRI I-411
  16547. æC  
  16548. ErrorSound sets the sound procedure for alerts to the procedure pointed to by soundProc;
  16549. if you don’t call ErrorSound, the Dialog Manager uses the standard sound procedure.
  16550. (For details, see the “Alerts” section.) If you pass NIL for soundProc, there will be
  16551. no sound (or menu bar blinking) at all.
  16552.  
  16553. Assembly-language note:  The address of the sound procedure being used is
  16554.                          stored in the global variable DABeeper.
  16555.  
  16556. æKY NewDialog
  16557. æFc Dialogs.h
  16558. æT Function
  16559. æTN A97D
  16560. æD pascal DialogPtr NewDialog(void *wStorage,const Rect *boundsRect,ConstStr255Param title,
  16561.     Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
  16562.     Handle itmLstHndl)
  16563.     = 0xA97D; 
  16564. æDT DialogPtr myVariable = NewDialog((void *) wStorage,(const Rect *) boundsRect,(ConstStr255Param) title,()
  16565.     Boolean visible,(short) procID,(WindowPtr) behind,(Boolean) goAwayFlag,(long) refCon,()
  16566.     Handle itmLstHndl);
  16567. æMM
  16568. æRI I-412, P-107, 177
  16569. æC 
  16570. NewDialog creates a dialog as specified by its parameters and returns a pointer to
  16571. the new dialog. The first eight parameters (dStorage through refCon) are passed to
  16572. the Window Manager function NewWindow, which creates the dialog window; the meanings
  16573. of these parameters are summarized below. The items parameter is a handle to the
  16574. dialog’s item list. You can get the items handle by calling the Resource Manager to
  16575. read the item list from the resource file into memory.
  16576.  
  16577. Note:  Advanced programmers can create their own item lists in memory rather
  16578.        than have them read from a resource file. The exact format is given
  16579.        later under “Formats of Resources for Dialogs and Alerts”.
  16580.  
  16581. DStorage is analogous to the wStorage parameter of NewWindow; it’s a pointer to the
  16582. storage to use for the dialog record. If you pass NIL for dStorage, the dialog record
  16583. will be allocated in the heap (which, in the case of modeless dialogs, may cause the
  16584. heap to become fragmented).
  16585.  
  16586. BoundsRect, a rectangle given in global coordinates, determines the dialog window’s
  16587. size and location. It becomes the portRect of the window’s grafPort. Remember that
  16588. the top coordinate of this rectangle should be at least 25 points below the top of
  16589. the screen for a modal dialog, to allow for the menu bar and the border around the
  16590. portRect, and at least 40 points below the top of the screen for a modeless dialog,
  16591. to allow for the menu bar and the window’s title bar.
  16592.  
  16593. Title is the title of a modeless dialog box; pass the empty string for modal dialogs.
  16594.  
  16595. If the visible parameter is TRUE, the dialog window is drawn on the screen. If it’s
  16596. FALSE, the window is initially invisible and may later be shown with a call to the
  16597. Window Manager procedure ShowWindow.
  16598.  
  16599. Note:  NewDialog generates an update event for the entire window contents,
  16600.        so the items aren’t drawn immediately, with the exception of controls.
  16601.        The Dialog Manager calls the Control Manager to draw controls, and the
  16602.        Control Manager draws them immediately rather than via the standard
  16603.        update mechanism. Because of this, the Dialog Manager calls the Window
  16604.        Manager procedure ValidRect for the enclosing rectangle of each control,
  16605.        so the controls won’t be drawn twice. If you find that the other items
  16606.        aren’t being drawn soon enough after the controls, try making the
  16607.        window invisible initially and then calling ShowWindow to show it.
  16608.  
  16609. ProcID is the window definition ID, which leads to the window definition function for
  16610. this type of window. The window definition IDs for the standard types of dialog
  16611. window are dBoxProc for the modal type and documentProc for the modeless type.
  16612.  
  16613. The behind parameter specifies the window behind which the dialog window is to be
  16614. placed on the desktop. Pass POINTER(–1) to bring up the dialog window in front of all
  16615. other windows.
  16616.  
  16617. GoAwayFlag applies to modeless dialog boxes; if it’s TRUE, the dialog window has a
  16618. close box in its title bar when the window is active.
  16619.  
  16620. RefCon is the dialog window’s reference value, which the application may store into
  16621. and access for any purpose.
  16622.  
  16623. NewDialog sets the font of the dialog window’s grafPort to the system font or, if you
  16624. previously called SetDAFont, to the specified font. It also sets the window class in
  16625. the window record to dialogKind.
  16626.  
  16627. æKY newdialog
  16628. æFc Dialogs.h
  16629. æT Function
  16630. æTN A97D
  16631. æD DialogPtr newdialog(void *wStorage,const Rect *boundsRect,char *title,Boolean visible,
  16632.     short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,Handle itmLstHndl); 
  16633. æDT DialogPtr myVariable = newdialog((void *) wStorage,(const Rect *) boundsRect,(char *) title,(Boolean) visible,()
  16634.     short procID,(WindowPtr) behind,(Boolean) goAwayFlag,(long) refCon,(Handle) itmLstHndl);
  16635. æMM
  16636. æRI I-412, P-107, 177
  16637. æC 
  16638. NewDialog creates a dialog as specified by its parameters and returns a pointer to
  16639. the new dialog. The first eight parameters (dStorage through refCon) are passed to
  16640. the Window Manager function NewWindow, which creates the dialog window; the meanings
  16641. of these parameters are summarized below. The items parameter is a handle to the
  16642. dialog’s item list. You can get the items handle by calling the Resource Manager to
  16643. read the item list from the resource file into memory.
  16644.  
  16645. Note:  Advanced programmers can create their own item lists in memory rather
  16646.        than have them read from a resource file. The exact format is given
  16647.        later under “Formats of Resources for Dialogs and Alerts”.
  16648.  
  16649. DStorage is analogous to the wStorage parameter of NewWindow; it’s a pointer to the
  16650. storage to use for the dialog record. If you pass NIL for dStorage, the dialog record
  16651. will be allocated in the heap (which, in the case of modeless dialogs, may cause the
  16652. heap to become fragmented).
  16653.  
  16654. BoundsRect, a rectangle given in global coordinates, determines the dialog window’s
  16655. size and location. It becomes the portRect of the window’s grafPort. Remember that
  16656. the top coordinate of this rectangle should be at least 25 points below the top of
  16657. the screen for a modal dialog, to allow for the menu bar and the border around the
  16658. portRect, and at least 40 points below the top of the screen for a modeless dialog,
  16659. to allow for the menu bar and the window’s title bar.
  16660.  
  16661. Title is the title of a modeless dialog box; pass the empty string for modal dialogs.
  16662.  
  16663. If the visible parameter is TRUE, the dialog window is drawn on the screen. If it’s
  16664. FALSE, the window is initially invisible and may later be shown with a call to the
  16665. Window Manager procedure ShowWindow.
  16666.  
  16667. Note:  NewDialog generates an update event for the entire window contents,
  16668.        so the items aren’t drawn immediately, with the exception of controls.
  16669.        The Dialog Manager calls the Control Manager to draw controls, and the
  16670.        Control Manager draws them immediately rather than via the standard
  16671.        update mechanism. Because of this, the Dialog Manager calls the Window
  16672.        Manager procedure ValidRect for the enclosing rectangle of each control,
  16673.        so the controls won’t be drawn twice. If you find that the other items
  16674.        aren’t being drawn soon enough after the controls, try making the
  16675.        window invisible initially and then calling ShowWindow to show it.
  16676.  
  16677. ProcID is the window definition ID, which leads to the window definition function for
  16678. this type of window. The window definition IDs for the standard types of dialog
  16679. window are dBoxProc for the modal type and documentProc for the modeless type.
  16680.  
  16681. The behind parameter specifies the window behind which the dialog window is to be
  16682. placed on the desktop. Pass POINTER(–1) to bring up the dialog window in front of all
  16683. other windows.
  16684.  
  16685. GoAwayFlag applies to modeless dialog boxes; if it’s TRUE, the dialog window has a
  16686. close box in its title bar when the window is active.
  16687.  
  16688. RefCon is the dialog window’s reference value, which the application may store into
  16689. and access for any purpose.
  16690.  
  16691. NewDialog sets the font of the dialog window’s grafPort to the system font or, if you
  16692. previously called SetDAFont, to the specified font. It also sets the window class in
  16693. the window record to dialogKind.
  16694.  
  16695. æKY GetNewDialog
  16696. æFc Dialogs.h
  16697. æT Function
  16698. æTN A97C
  16699. æD pascal DialogPtr GetNewDialog(short dialogID,void *dStorage,WindowPtr behind)
  16700.     = 0xA97C; 
  16701. æDT DialogPtr myVariable = GetNewDialog((short) dialogID,(void *) dStorage,(WindowPtr) behind);
  16702. æMM
  16703. æRT 4,34
  16704. æRI I-413, V-284, N4-1,  P-107, 172
  16705. æC 
  16706. Like NewDialog (above), GetNewDialog creates a dialog as specified by its parameters
  16707. and returns a pointer to the new dialog. Instead of having the parameters boundsRect,
  16708. title, visible, procID, goAwayFlag, and refCon, GetNewDialog has a single dialogID
  16709. parameter, where dialogID is the resource ID of a dialog template that supplies the
  16710. same information as those parameters. The dialog template also contains the resource
  16711. ID of the dialog’s item list. After calling the Resource Manager to read the item
  16712. list into memory (if it’s not already in memory), GetNewDialog makes a copy of the
  16713. item list and uses that copy; thus you may have multiple independent dialogs whose
  16714. items have the same types, locations, and initial contents. The dStorage and behind
  16715. parameters of GetNewDialog have the same meaning as in NewDialog.
  16716.  
  16717. Warning:  If either the dialog template resource or the item list
  16718.           resource can’t be read, the function result is undefined.
  16719.  
  16720. Note:  GetNewDialog doesn’t release the memory occupied by the resources.
  16721.  
  16722. The GetNewDialog routine will attempt to load a 'dctb' resource and returns a pointer
  16723. to a color grafPort if the resource exists. If no 'dctb' resource is present, GetNewDialog
  16724. returns a pointer to an old grafPort.
  16725.  
  16726. The dialog color table is copied before it is passed to SetWinSize unless its ctSize
  16727. field is equal to –1, indicating that the default window colors are to be used instead.
  16728. The copy is made so that the color table resource can be purged without affecting the
  16729. dialog.
  16730.  
  16731. The color dialog item list resource is duplicated as well, so it can be purgeable.
  16732.  
  16733. æKY CloseDialog
  16734. æFc Dialogs.h
  16735. æT Function
  16736. æTN A982
  16737. æD pascal void CloseDialog(DialogPtr theDialog)
  16738.     = 0xA982; 
  16739. æDT CloseDialog((DialogPtr) theDialog);
  16740. æMM
  16741. æRI I-413, P-107, 167
  16742. æC 
  16743. CloseDialog removes theDialog’s window from the screen and deletes it from the window
  16744. list, just as when the Window Manager procedure CloseWindow is called. It releases
  16745. the memory occupied by the following:
  16746.  
  16747.   •  The data structures associated with the dialog window (such as the
  16748.      window’s structure, content, and update regions).
  16749.   •  All the items in the dialog (except for pictures and icons, which
  16750.      might be shared resources), and any data structures associated with
  16751.      them. For example, it would dispose of the region occupied by the
  16752.      thumb of a scroll bar, or a similar region for some other control
  16753.      in the dialog.
  16754.  
  16755. CloseDialog does not dispose of the dialog record or the item list. Figure 10 illustrates
  16756. the effect of CloseDialog (and DisposDialog, described below).
  16757.  
  16758. •••Refer to Figure 10.•••
  16759.  
  16760. Figure 10–CloseDialog and DisposDialog
  16761.  
  16762. Call CloseDialog when you’re done with a dialog if you supplied NewDialog or GetNewDialog
  16763. with a pointer to the dialog storage (in the dStorage parameter) when you created the
  16764. dialog.
  16765.  
  16766. Note:  Even if you didn’t supply a pointer to the dialog storage, you may
  16767.        want to call CloseDialog if you created the dialog with NewDialog.
  16768.        You would call CloseDialog if you wanted to keep the item list around
  16769.        (since, unlike GetNewDialog, NewDialog does not use a copy of the
  16770.        item list).
  16771.  
  16772. æKY DisposDialog
  16773. æFc Dialogs.h
  16774. æT Function
  16775. æTN A983
  16776. æD pascal void DisposDialog(DialogPtr theDialog)
  16777.     = 0xA983; 
  16778. æDT DisposDialog((DialogPtr) theDialog);
  16779. æRI I-415
  16780. æC 
  16781. DisposDialog calls CloseDialog (above) and then releases the memory occupied by the
  16782. dialog’s item list and dialog record. Call DisposDialog when you’re done with a
  16783. dialog if you let the dialog record be allocated in the heap when you created the
  16784. dialog (by passing NIL as the dStorage parameter to NewDialog or GetNewDialog).
  16785.  
  16786. æKY DisposeDialog
  16787. æFc Dialogs.h
  16788. æT Function
  16789. æTN A983
  16790. æD pascal void DisposeDialog(DialogPtr theDialog)
  16791.     = 0xA983; 
  16792. æDT DisposeDialog((DialogPtr) theDialog);
  16793. æRI I-415
  16794. æC 
  16795. DisposDialog calls CloseDialog (above) and then releases the memory occupied by the
  16796. dialog’s item list and dialog record. Call DisposDialog when you’re done with a
  16797. dialog if you let the dialog record be allocated in the heap when you created the
  16798. dialog (by passing NIL as the dStorage parameter to NewDialog or GetNewDialog).
  16799.  
  16800. æKY CouldDialog
  16801. æFc Dialogs.h
  16802. æT Function
  16803. æTN A979
  16804. æD pascal void CouldDialog(short dialogID)
  16805.     = 0xA979; 
  16806. æDT CouldDialog((short) dialogID);
  16807. æMM
  16808. æRI I-415, V-284
  16809. æC 
  16810. CouldDialog makes the dialog template having the given resource ID unpurgeable
  16811. (reading it into memory if it’s not already there). It does the same for the dialog
  16812. window’s definition function, the dialog’s item list resource, and any items defined
  16813. as resources. This is useful if the dialog box may come up when the resource file
  16814. isn’t accessible, such as during a disk copy.
  16815.  
  16816. Warning:  CouldDialog assumes your dialogs use the system font; if you’ve
  16817.           changed the font with SetDAFont, calling CouldDialog doesn’t make
  16818.           the font unpurgeable.
  16819.  
  16820. The CouldDialog procedure makes the dialog color table template unpurgeable
  16821. (reading it into memory if it isn’t already there), if it exists. It does the same
  16822. for the dialog’s color item list, if it has one.
  16823.  
  16824. Warning:  CouldDialog doesn’t load or make 'FONT' or 'FOND' resources
  16825.           indicated in the color item list unpurgeable.
  16826.  
  16827. æKY FreeDialog
  16828. æFc Dialogs.h
  16829. æT Function
  16830. æTN A97A
  16831. æD pascal void FreeDialog(short dialogID)
  16832.     = 0xA97A; 
  16833. æDT FreeDialog((short) dialogID);
  16834. æMM
  16835. æRI I-415, V-284
  16836. æC 
  16837. Given the resource ID of a dialog template previously specified in a call to CouldDialog,
  16838. FreeDialog undoes the effect of CouldDialog (by making the resources purgeable). It
  16839. should be called when there’s no longer a need to keep the resources in memory.
  16840.  
  16841. Given the resource ID of a dialog template previously specified in a call to CouldDialog,
  16842. the FreeDialog routine undoes the effect of CouldDialog, by restoring the original
  16843. purge state of the color table and color item list resources.
  16844.  
  16845. æKY ParamText
  16846. æFc Dialogs.h
  16847. æT Function
  16848. æTN A98B
  16849. æD pascal void ParamText(ConstStr255Param param0,ConstStr255Param param1,ConstStr255Param param2,
  16850.     ConstStr255Param param3)
  16851.     = 0xA98B; 
  16852. æDT ParamText((ConstStr255Param) param0,(ConstStr255Param) param1,(ConstStr255Param) param2,()
  16853.     ConstStr255Param param3);
  16854. æMM
  16855. æRI I-421
  16856. æC  
  16857. ParamText provides a means of substituting text in statText items:  param0 through
  16858. param3 will replace the special strings '^0' through '^3' in all statText items in
  16859. all subsequent dialog or alert boxes. Pass empty strings for parameters not used.
  16860.  
  16861. Assembly-language note:  Assembly-language programmers may pass NIL for
  16862.                          parameters not used or for strings that are not
  16863.                          to be changed.
  16864.  
  16865. For example, if the text is defined as 'Cannot open document ^0' and docName is a
  16866. string variable containing a document name that the user typed, you can call ParamText(docName,'
  16867. ',' ',' ')
  16868.  
  16869. Note:  All strings that may need to be translated to other languages should
  16870.        be stored in resource files.
  16871.  
  16872. Assembly-language note:  The Dialog Manager stores handles to the four
  16873.                          ParamText parameters in a global array named DAStrings.
  16874.  
  16875. æKY ModalDialog
  16876. æFc Dialogs.h
  16877. æT Function
  16878. æTN A991
  16879. æD pascal void ModalDialog(ModalFilterProcPtr filterProc,short *itemHit)
  16880.     = 0xA991; 
  16881. æDT ModalDialog((ModalFilterProcPtr) filterProc,(short *) itemHit);
  16882. æMM
  16883. æRT 34, 203
  16884. æRI I-415, N34-2, 3,   P-108, 176
  16885. æC  
  16886. Call ModalDialog after creating a modal dialog and bringing up its window in the
  16887. frontmost plane. ModalDialog repeatedly gets and handles events in the dialog’s
  16888. window; after handling an event involving an enabled dialog item, it returns with the
  16889. item number in itemHit. Normally you’ll then do whatever is appropriate as a response
  16890. to an event in that item.
  16891.  
  16892. ModalDialog gets each event by calling the Toolbox Event Manager function GetNextEvent.
  16893. If the event is a mouse-down event outside the content region of the dialog window,
  16894. ModalDialog emits sound number 1 (which should be a single beep) and gets the next
  16895. event; otherwise, it filters and handles the event as described below.
  16896.  
  16897. Note:  Once before getting each event, ModalDialog calls SystemTask, a
  16898.        Desk Manager procedure that must be called regularly so that desk
  16899.        accessories will work properly.
  16900.  
  16901. The filterProc parameter determines how events are filtered. If it’s NIL, the standard
  16902. filterProc function is executed; this causes ModalDialog to return 1 in itemHit if
  16903. the Return key or Enter key is pressed. If filterProc isn’t NIL, ModalDialog filters
  16904. events by executing the function it points to. Your filterProc function should have
  16905. three parameters and return a Boolean value. For example, this is how it would be
  16906. declared if it were named MyFilter:
  16907.  
  16908. FUNCTION MyFilter (theDialog:  DialogPtr; VAR theEvent:  EventRecord;
  16909.                    VAR itemHit:  INTEGER) :  BOOLEAN;
  16910.  
  16911. A function result of FALSE tells ModalDialog to go ahead and handle the event, which
  16912. either can be sent through unchanged or can be changed to simulate a different event.
  16913. A function result of TRUE tells ModalDialog to return immediately rather than handle
  16914. the event; in this case, the filterProc function sets itemHit to the item number that
  16915. ModalDialog should return.
  16916.  
  16917. Note:  If you want it to be consistent with the standard filterProc function,
  16918.        your function should at least check whether the Return key or Enter
  16919.        key was pressed and, if so, return 1 in itemHit and a function result
  16920.        of TRUE.
  16921.  
  16922. You can use the filterProc function, for example, to treat a typed character in a
  16923. special way (such as ignore it, or make it have the same effect as another character
  16924. or as clicking a button); in this case, the function would test for a key-down event
  16925. with that character. As another example, suppose the dialog box contains a userItem
  16926. whose procedure draws a clock with the current time displayed. The filterProc function
  16927. can call that procedure and return FALSE without altering the current event.
  16928.  
  16929. Note:  ModalDialog calls GetNextEvent with a mask that excludes disk-inserted
  16930.        events. To receive disk-inserted events, your filterProc function can
  16931.        call GetNextEvent (or EventAvail) with a mask that accepts only that
  16932.        type of event.
  16933.  
  16934. ModalDialog handles the events for which the filterProc function returns FALSE as
  16935. follows:
  16936.  
  16937.   •  In response to an activate or update event for the dialog window,
  16938.      ModalDialog activates or updates the window.
  16939.   •  If the mouse button is pressed in an editText item, ModalDialog
  16940.      responds to the mouse activity as appropriate (displaying an insertion
  16941.      point or selecting text). If a key-down event occurs and there’s an
  16942.      editText item, text entry and editing are handled in the standard way
  16943.      for such items (except that if the Command key is down, ModalDialog
  16944.      responds as though it’s not). In either case, ModalDialog returns if
  16945.      the editText item is enabled or does nothing if it’s disabled. If a
  16946.      key-down event occurs when there’s no editText item, ModalDialog does
  16947.      nothing.
  16948.   •  If the mouse button is pressed in a control, ModalDialog calls the
  16949.      Control Manager function TrackControl. If the mouse button is released
  16950.      inside the control and the control is enabled, ModalDialog returns;
  16951.      otherwise, it does nothing.
  16952.   •  If the mouse button is pressed in any other enabled item in the
  16953.      dialog box, ModalDialog returns. If the mouse button is pressed in
  16954.      any other disabled item or in no item, or if any other event occurs,
  16955.      ModalDialog does nothing.
  16956.  
  16957. æKY IsDialogEvent
  16958. æFc Dialogs.h
  16959. æT Function
  16960. æTN A97F
  16961. æD pascal Boolean IsDialogEvent(const EventRecord *theEvent)
  16962.     = 0xA97F; 
  16963. æDT Boolean myVariable = IsDialogEvent((const EventRecord *) theEvent);
  16964. æRI I-416, N5-1, P-108, 175
  16965. æC  
  16966. If your application includes any modeless dialogs, call IsDialogEvent after calling
  16967. the Toolbox Event Manager function GetNextEvent.
  16968.  
  16969. Warning:  If your modeless dialog contains any editText items, you must call
  16970.           IsDialogEvent (and then DialogSelect) even if GetNextEvent returns
  16971.           FALSE; otherwise your dialog won’t receive null events and the
  16972.           caret won’t blink.
  16973.  
  16974. Pass the current event in theEvent. IsDialogEvent determines whether theEvent needs
  16975. to be handled as part of a dialog. If theEvent is an activate or update event for a
  16976. dialog window, a mouse-down event in the content region of an active dialog window,
  16977. or any other type of event when a dialog window is active, IsDialogEvent returns
  16978. TRUE; otherwise, it returns FALSE.
  16979.  
  16980. When FALSE is returned, just handle the event yourself like any other event that’s
  16981. not dialog-related. When TRUE is returned, you’ll generally end up passing the event
  16982. to DialogSelect for it to handle (as described below), but first you should do some
  16983. additional checking:
  16984.  
  16985.   •  DialogSelect doesn’t handle keyboard equivalents of commands. Check
  16986.      whether the event is a key-down event with the Command key held down
  16987.      and, if so, carry out the command if it’s one that applies when a
  16988.      dialog window is active. (If the command doesn’t so apply, do nothing.)
  16989.   •  In special cases, you may want to bypass DialogSelect or do some
  16990.      preprocessing before calling it. If so, check for those events and
  16991.      respond accordingly. You would need to do this, for example, if the
  16992.      dialog is to respond to disk-inserted events.
  16993.  
  16994. For cases other than these, pass the event to DialogSelect for it to handle.
  16995.  
  16996. æKY DialogSelect
  16997. æFc Dialogs.h
  16998. æT Function
  16999. æTN A980
  17000. æD pascal Boolean DialogSelect(const EventRecord *theEvent,DialogPtr *theDialog,
  17001.     short *itemHit)
  17002.     = 0xA980; 
  17003. æDT Boolean myVariable = DialogSelect((const EventRecord *) theEvent,(DialogPtr *) theDialog,(
  17004.     short) * itemHit);
  17005. æMM
  17006. æRT 34
  17007. æRI I-417, N34-3, P-108, 168
  17008. æC 
  17009. You’ll normally call DialogSelect when IsDialogEvent returns TRUE, passing in theEvent
  17010. an event that needs to be handled as part of a modeless dialog. DialogSelect handles
  17011. the event as described below. If the event involves an enabled dialog item, DialogSelect
  17012. returns a function result of TRUE with the dialog pointer in theDialog and the item
  17013. number in itemHit; otherwise, it returns FALSE with theDialog and itemHit undefined.
  17014. Normally when DialogSelect returns TRUE, you’ll do whatever is appropriate as a
  17015. response to the event, and when it returns FALSE you’ll do nothing.
  17016.  
  17017. If the event is an activate or update event for a dialog window, DialogSelect activates
  17018. or updates the window and returns FALSE.
  17019.  
  17020. If the event is a mouse-down event in an editText item, DialogSelect responds as
  17021. appropriate (displaying a caret at the insertion point or selecting text). If it’s a
  17022. key-down or auto-key event and there’s an editText item, text entry and editing are
  17023. handled in the standard way. In either case, DialogSelect returns TRUE if the editText
  17024. item is enabled or FALSE if it’s disabled. If a key-down or auto-key event is passed
  17025. when there’s no editText item, DialogSelect returns FALSE.
  17026.  
  17027. Note:  For a keyboard event, DialogSelect doesn’t check to see whether the
  17028.        Command key is held down; to handle keyboard equivalents of commands,
  17029.        you have to check for them before calling DialogSelect. Similarly, to
  17030.        treat a typed character in a special way (such as ignore it, or make
  17031.        it have the same effect as another character or as clicking a button),
  17032.        you need to check for a key-down event with that character before
  17033.        calling DialogSelect.
  17034.  
  17035. If the event is a mouse-down event in a control, DialogSelect calls the Control
  17036. Manager function TrackControl. If the mouse button is released inside the control and
  17037. the control is enabled, DialogSelect returns TRUE; otherwise, it returns FALSE.
  17038.  
  17039. If the event is a mouse-down event in any other enabled item, DialogSelect returns
  17040. TRUE. If it’s a mouse-down event in any other disabled item or in no item, or if it’s
  17041. any other event, DialogSelect returns FALSE.
  17042.  
  17043. Note:  If the event isn’t one that DialogSelect specifically checks for (if
  17044.        it’s a null event, for example), and there’s an editText item in the
  17045.        dialog, DialogSelect calls the TextEdit procedure TEIdle to make the
  17046.        caret blink.
  17047.  
  17048. æKY DrawDialog
  17049. æFc Dialogs.h
  17050. æT Function
  17051. æTN A981
  17052. æD pascal void DrawDialog(DialogPtr theDialog)
  17053.     = 0xA981; 
  17054. æDT DrawDialog((DialogPtr) theDialog);
  17055. æMM
  17056. æRI I-418
  17057. æC 
  17058. DrawDialog draws the contents of the given dialog box. Since DialogSelect and ModalDialog
  17059. handle dialog window updating, this procedure is useful only in unusual situations.
  17060. You would call it, for example, to display a dialog box that doesn’t require any
  17061. response but merely tells the user what’s going on during a time-consuming process.
  17062.  
  17063. æKY UpdtDialog
  17064. æFc Dialogs.h
  17065. æT Function
  17066. æTN A978
  17067. æD pascal void UpdtDialog(DialogPtr theDialog,RgnHandle updateRgn)
  17068.     = 0xA978; 
  17069. æDT UpdtDialog((DialogPtr) theDialog,(RgnHandle) updateRgn);
  17070. æMM
  17071. æRI IV-60
  17072. æC  
  17073. UpdtDialog is a faster version of the DrawDialog procedure. Instead of drawing the
  17074. entire contents of the given dialog box, UpdtDialog draws only the items that are in
  17075. a specified update region. UpdtDialog is called in response to an update event, and
  17076. is usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  17077. UpdateRgn should be set to the visRgn of theWindow’s port. (For more details, see the
  17078. BeginUpdate procedure in the Window Manager chapter.)
  17079.  
  17080. æKY UpdateDialog
  17081. æFc Dialogs.h
  17082. æT Function
  17083. æTN A978
  17084. æD pascal void UpdateDialog(DialogPtr theDialog,RgnHandle updateRgn)
  17085.     = 0xA978; 
  17086. æDT UpdateDialog((DialogPtr) theDialog,(RgnHandle) updateRgn);
  17087. æMM
  17088. æRI IV-60
  17089. æC  
  17090. UpdtDialog is a faster version of the DrawDialog procedure. Instead of drawing the
  17091. entire contents of the given dialog box, UpdtDialog draws only the items that are in
  17092. a specified update region. UpdtDialog is called in response to an update event, and
  17093. is usually bracketed by calls to the Window Manager procedures BeginUpdate and EndUpdate.
  17094. UpdateRgn should be set to the visRgn of theWindow’s port. (For more details, see the
  17095. BeginUpdate procedure in the Window Manager chapter.)
  17096.  
  17097. æKY Alert
  17098. æFc Dialogs.h
  17099. æT Function
  17100. æTN A985
  17101. æD pascal short Alert(short alertID,ModalFilterProcPtr filterProc)
  17102.     = 0xA985; 
  17103. æDT short myVariable = Alert((short) alertID,(ModalFilterProcPtr) filterProc);
  17104. æMM
  17105. æRI I-418, V-284
  17106. æC 
  17107. This function invokes the alert defined by the alert template that has the given
  17108. resource ID. It calls the current sound procedure, if any, passing it the sound
  17109. number specified in the alert template for this stage of the alert. If no alert box
  17110. is to be drawn at this stage, Alert returns a function result of –1; otherwise, it
  17111. creates and displays the alert window for this alert and draws the alert box.
  17112.  
  17113. Warning:  If the alert template resource can’t be read, the function result
  17114.           is undefined.
  17115.  
  17116. Note:  Alert creates the alert window by calling NewDialog, and does the
  17117.        rest of its processing by calling ModalDialog.
  17118.  
  17119. Alert repeatedly gets and handles events in the alert window until an enabled item is
  17120. clicked, at which time it returns the item number. Normally you’ll then do whatever
  17121. is appropriate in response to a click of that item.
  17122.  
  17123. Alert gets each event by calling the Toolbox Event Manager function GetNextEvent. If
  17124. the event is a mouse-down event outside the content region of the alert window, Alert
  17125. emits sound number 1 (which should be a single beep) and gets the next event; otherwise,
  17126. it filters and handles the event as described below.
  17127.  
  17128. The filterProc parameter has the same meaning as in ModalDialog (see above). If it’s
  17129. NIL, the standard filterProc function is executed, which makes the Return key or the
  17130. Enter key have the same effect as clicking the default button. If you specify your
  17131. own filterProc function and want to retain this feature, you must include it in your
  17132. function. You can find out what the current default button is by looking at the
  17133. aDefItem field of the dialog record for the alert
  17134. (via the dialog pointer passed to the function).
  17135.  
  17136. Alert handles the events for which the filterProc function returns FALSE as follows:
  17137.  
  17138.   •  If the mouse button is pressed in a control, Alert calls the Control
  17139.      Manager procedure TrackControl. If the mouse button is released inside
  17140.      the control and the control is enabled, Alert returns; otherwise, it
  17141.      does nothing.
  17142.   •  If the mouse button is pressed in any other enabled item, Alert simply
  17143.      returns. If it’s pressed in any other disabled item or in no item, or
  17144.      if any other event occurs, Alert does nothing.
  17145.  
  17146. Before returning to the application with the item number, Alert removes the alert box
  17147. from the screen. (It disposes of the alert window and its associated data structures,
  17148. the item list, and the items.)
  17149.  
  17150. Note:  When an alert is removed, if it was overlapping the default button
  17151.        of a previous alert, that button’s bold outline won’t be redrawn.
  17152.  
  17153. Note:  The Alert function’s removal of the alert box would not be the
  17154.        desired result if the user clicked a check box or radio button;
  17155.        however, normally alerts contain only static text, icons, pictures,
  17156.        and buttons that are supposed to make the alert box go away. If your
  17157.        alert contains other items besides these, consider whether it might
  17158.        be more appropriate as a dialog.
  17159.  
  17160. The Alert function looks for a resource of type 'actb' with the same ID as the alert.
  17161. The alert color table is copied before it is passed to SetWinSize unless its ctSize
  17162. field is equal to –1, indicating that the default window colors are to be used instead.
  17163. The copy is made so that the color table resource can be purged without affecting the
  17164. alert.
  17165.  
  17166. The color dialog item list resource is duplicated as well, so it can be purgeable.
  17167.  
  17168. æKY StopAlert
  17169. æFc Dialogs.h
  17170. æT Function
  17171. æTN A986
  17172. æD pascal short StopAlert(short alertID,ModalFilterProcPtr filterProc)
  17173.     = 0xA986; 
  17174. æDT short myVariable = StopAlert((short) alertID,(ModalFilterProcPtr) filterProc);
  17175. æMM
  17176. æRI I-419, V-284, P-109, 182
  17177. æC  
  17178. StopAlert is the same as the Alert function (above) except that before drawing the
  17179. items of the alert in the alert box, it draws the Stop icon in the top left corner of
  17180. the box (within the rectangle (10,20)(42,52)). The Stop icon has the following resource
  17181. ID:
  17182.  
  17183. CONST stopIcon = 0;
  17184.  
  17185. If the application’s resource file doesn’t include an icon with that ID number, the
  17186. Dialog Manager uses the standard Stop icon in the system resource file (see Figure
  17187. 11).
  17188.  
  17189. The calls CautionAlert, StopAlert, and NoteAlert look for a resource of type
  17190. 'actb' with the same ID as the alert.
  17191.  
  17192. •••Refer to Figure 11.•••
  17193.  
  17194. Figure 11–Standard Alert Icons
  17195.  
  17196. æKY NoteAlert
  17197. æFc Dialogs.h
  17198. æT Function
  17199. æTN A987
  17200. æD pascal short NoteAlert(short alertID,ModalFilterProcPtr filterProc)
  17201.     = 0xA987; 
  17202. æDT short myVariable = NoteAlert((short) alertID,(ModalFilterProcPtr) filterProc);
  17203. æMM
  17204. æRI I-420
  17205. æC  
  17206. NoteAlert is like StopAlert except that it draws the Note icon, which has the following
  17207. resource ID:
  17208.  
  17209. CONST noteIcon = 1;
  17210.  
  17211. The calls CautionAlert, StopAlert, and NoteAlert look for a resource of type
  17212. 'actb' with the same ID as the alert.
  17213.  
  17214. æKY CautionAlert
  17215. æFc Dialogs.h
  17216. æT Function
  17217. æTN A988
  17218. æD pascal short CautionAlert(short alertID,ModalFilterProcPtr filterProc)
  17219.     = 0xA988; 
  17220. æDT short myVariable = CautionAlert((short) alertID,(ModalFilterProcPtr) filterProc);
  17221. æMM
  17222. æRI I-420
  17223. æC  
  17224. CautionAlert is like StopAlert except that it draws the Caution icon, which has the
  17225. following resource ID:
  17226.  
  17227. CONST cautionIcon = 2;
  17228.  
  17229. The calls CautionAlert, StopAlert, and NoteAlert look for a resource of type
  17230. 'actb' with the same ID as the alert.
  17231.  
  17232. æKY CouldAlert
  17233. æFc Dialogs.h
  17234. æT Function
  17235. æTN A989
  17236. æD pascal void CouldAlert(short alertID)
  17237.     = 0xA989; 
  17238. æDT CouldAlert((short) alertID);
  17239. æMM
  17240. æRI I-420, V-285
  17241. æC 
  17242. CouldAlert makes the alert template having the given resource ID unpurgeable
  17243. (reading it into memory if it’s not already there). It does the same for the alert
  17244. window’s definition function, the alert’s item list resource, and any items defined
  17245. as resources. This is useful if the alert may occur when the resource file isn’t
  17246. accessible, such as during a disk copy.
  17247.  
  17248. Warning:  Like CouldDialog, CouldAlert assumes your alerts use the system
  17249.           font; if you’ve changed the font with SetDAFont, calling CouldAlert
  17250.           doesn’t make the font unpurgeable.
  17251.  
  17252. The CouldAlert routine makes the alert color table template unpurgeable
  17253. (reading it into memory if it isn’t already there), if it exists. It does the same
  17254. for the alert’s color item list, if it has one.
  17255.  
  17256. Warning:  Like CouldDialog, CouldAlert doesn’t load or make 'FONT' or
  17257.           'FOND' resources indicated in the color item list unpurgeable.
  17258.  
  17259. æKY FreeAlert
  17260. æFc Dialogs.h
  17261. æT Function
  17262. æTN A98A
  17263. æD pascal void FreeAlert(short alertID)
  17264.     = 0xA98A; 
  17265. æDT FreeAlert((short) alertID);
  17266. æMM
  17267. æRI I-420, V-285
  17268. æC 
  17269. Given the resource ID of an alert template previously specified in a call to CouldAlert,
  17270. FreeAlert undoes the effect of CouldAlert (by making the resources purgeable). It
  17271. should be called when there’s no longer a need to keep the resources in memory.
  17272.  
  17273. Given the resource ID of an alert template previously specified in a call to CouldAlert,
  17274. the FreeAlert routine undoes the effect of CouldAlert, by restoring the original
  17275. purge state of the color table and color item list resources.
  17276.  
  17277. æKY GetDItem
  17278. æFc Dialogs.h
  17279. æT Function
  17280. æTN A98D
  17281. æD pascal void GetDItem(DialogPtr theDialog,short itemNo,short *itemType,Handle *item,
  17282.     Rect *box)
  17283.     = 0xA98D; 
  17284. æDT GetDItem((DialogPtr) theDialog,(short) itemNo,(short *) itemType,(Handle *) item,(
  17285.     Rect) * box);
  17286. æMM
  17287. æRI I-421
  17288. æC  
  17289. GetDItem returns in its VAR parameters the following information about the item
  17290. numbered itemNo in the given dialog’s item list:  In the itemType parameter, the item
  17291. type; in the item parameter, a handle to the item (or, for item type userItem, the
  17292. procedure pointer); and in the box parameter, the display rectangle for the item.
  17293.  
  17294. Suppose, for example, that you want to change the title of a control in a dialog box.
  17295. You can get the item handle with GetDItem, coerce it to type ControlHandle, and call
  17296. the Control Manager procedure SetCTitle to change the title. Similarly, to move the
  17297. control or change its size, you would call MoveControl or SizeControl.
  17298.  
  17299. Note:  To access the text of a statText or editText item, you can pass the
  17300.        handle returned by GetDItem to GetIText or SetIText (see below).
  17301.  
  17302. æKY SetDItem
  17303. æFc Dialogs.h
  17304. æT Function
  17305. æTN A98E
  17306. æD pascal void SetDItem(DialogPtr theDialog,short itemNo,short itemType,Handle item,
  17307.     const Rect *box)
  17308.     = 0xA98E; 
  17309. æDT SetDItem((DialogPtr) theDialog,(short) itemNo,(short) itemType,(Handle) item,(
  17310.     const Rect) * box);
  17311. æMM
  17312. æRT 34
  17313. æRI I-421, N34-1
  17314. æC  
  17315. SetDItem sets the item numbered itemNo in the given dialog’s item list, as specified
  17316. by the parameters (without drawing the item). The itemType parameter is the item
  17317. type; the item parameter is a handle to the item (or, for item type userItem, the
  17318. procedure pointer); and the box parameter is the display rectangle for the item.
  17319.  
  17320. Consider, for example, how to install an item of type userItem in a dialog:  In the
  17321. item list in the resource file, define an item in which the type is set to userItem
  17322. and the display rectangle to (0,0)(0,0). Specify that the dialog window be invisible
  17323. (in either the dialog template or the NewDialog call). After creating the dialog,
  17324. coerce the item’s procedure pointer to type Handle; then call SetDItem, passing that
  17325. handle and the display rectangle for the item. Finally, call the Window Manager
  17326. procedure ShowWindow to display the dialog window.
  17327.  
  17328. Note:  Do not use SetDItem to change the text of a statText or editText item
  17329.        or to change or move a control. See the description of GetDItem above
  17330.        for more information.
  17331.  
  17332. æKY HideDItem
  17333. æFc Dialogs.h
  17334. æT Function
  17335. æTN A827
  17336. æD pascal void HideDItem(DialogPtr theDialog,short itemNo)
  17337.     = 0xA827; 
  17338. æDT HideDItem((DialogPtr) theDialog,(short) itemNo);
  17339. æMM
  17340. æRI IV-59
  17341. æC 
  17342. HideDItem hides the item numbered itemNo in the given dialog’s item list by giving
  17343. the item a display rectangle that’s off the screen. (Specifically, if the left coordinate
  17344. of the item’s display rectangle is less than 8192, ShowDItem adds 16384 to both the
  17345. left and right coordinates the rectangle.) If the item is already hidden (that is, if
  17346. the left coordinate is greater than 8192), HideDItem does nothing.
  17347.  
  17348. HideDItem calls the EraseRect procedure on the item’s enclosing rectangle and adds
  17349. the rectangle that contained the item (not necessarily the item’s display rectangle)
  17350. to the update region. If the specified item is an active editText item, the item is
  17351. first deactivated (by calling TEDeactivate).
  17352.  
  17353. Note:  If you have items that are close to each other, be aware that the
  17354.        Dialog Manager draws outside of the enclosing rectangle by 3 pixels
  17355.        for editText items and by 4 pixels for a default button.
  17356.  
  17357. An item that’s been hidden by HideDItem can be redisplayed by the ShowDItem procedure.
  17358.  
  17359. Note:  To create a hidden item in a dialog item list, simply add 16384 to
  17360.        the left and right coordinates of the display rectangle.
  17361.  
  17362. æKY ShowDItem
  17363. æFc Dialogs.h
  17364. æT Function
  17365. æTN A828
  17366. æD pascal void ShowDItem(DialogPtr theDialog,short itemNo)
  17367.     = 0xA828; 
  17368. æDT ShowDItem((DialogPtr) theDialog,(short) itemNo);
  17369. æMM
  17370. æRI IV-59
  17371. æC 
  17372. ShowDItem redisplays the item numbered itemNo, previously hidden by HideDItem, by
  17373. giving the item the display rectangle it had prior to the HideDItem call.
  17374. (Specifically, if the left coordinate of the item’s display rectangle is greater than
  17375. 8192, ShowDItem subtracts 16384 from both the left and right coordinates of the rectangle.)
  17376. If the item is already visible (that is, if the left coordinate is less than 8192),
  17377. ShowDItem does nothing.
  17378.  
  17379. ShowDItem adds the rectangle that contained the item (not necessarily the
  17380. item’s display rectangle) to the update region so that it will be drawn. If the item
  17381. becomes the only editText item, ShowDItem activates it (by calling TEActivate).
  17382.  
  17383. æKY SelIText
  17384. æFc Dialogs.h
  17385. æT Function
  17386. æTN A97E
  17387. æD pascal void SelIText(DialogPtr theDialog,short itemNo,short strtSel,short endSel)
  17388.     = 0xA97E; 
  17389. æDT SelIText((DialogPtr) theDialog,(short) itemNo,(short) strtSel,(short) endSel);
  17390. æMM
  17391. æRI I-422, P-110
  17392. æC 
  17393. Given a pointer to a dialog and the item number of an editText item in the dialog
  17394. box, SelIText does the following:
  17395.  
  17396.   •  If the item contains text, SelIText sets the selection range to extend
  17397.      from character position strtSel up to but not including character
  17398.      position endSel. The selection range is inverted unless strtSel equals
  17399.      endSel, in which case a blinking vertical bar is displayed to indicate
  17400.      an insertion point at that position.
  17401.   •  If the item doesn’t contain text, SelIText simply displays the insertion
  17402.      point.
  17403.  
  17404. For example, if the user makes an unacceptable entry in the editText item, the application
  17405. can put up an alert box reporting the problem and then select the entire text of the
  17406. item so it can be replaced by a new entry. (Without this procedure, the user would
  17407. have to select the item before making the new entry.)
  17408.  
  17409. Note:  You can select the entire texxt by specifying 0 for strtSel and 32767
  17410.        for endSel. For details about selection range and character position,
  17411.        see the TextEdit chapter.
  17412.  
  17413. æKY GetIText
  17414. æFc Dialogs.h
  17415. æT Function
  17416. æTN A990
  17417. æD pascal void GetIText(Handle item,Str255 text)
  17418.     = 0xA990; 
  17419. æDT GetIText((Handle) item,(Str255) text);
  17420. æRT 18
  17421. æRI I-422, N18-2
  17422. æC  
  17423. Given a handle to a statText or editText item in a dialog box, as returned by GetDItem,
  17424. GetIText returns the text of the item in the text parameter. (If the user typed more
  17425. than 255 characters in an editText item, GetIText returns only the first 255.)
  17426.  
  17427. æKY SetIText
  17428. æFc Dialogs.h
  17429. æT Function
  17430. æTN A98F
  17431. æD pascal void SetIText(Handle item,ConstStr255Param text)
  17432.     = 0xA98F; 
  17433. æDT SetIText((Handle) item,(ConstStr255Param) text);
  17434. æMM
  17435. æRI I-422
  17436. æC 
  17437. Given a handle to a statText or editText item in a dialog box, as returned by GetDItem,
  17438. SetIText sets the text of the item to the specified text and draws the item. For
  17439. example, suppose the exact content of a dialog’s text item cannot be determined until
  17440. the application is running, but the display rectangle is defined in the resource
  17441. file:  Call GetDItem to get a handle to the item, and call SetIText with the desired
  17442. text.
  17443.  
  17444. æKY FindDItem
  17445. æFc Dialogs.h
  17446. æT Function
  17447. æTN A984
  17448. æD pascal short FindDItem(DialogPtr theDialog,Point thePt)
  17449.     = 0xA984; 
  17450. æDT short myVariable = FindDItem((DialogPtr) theDialog,(Point) thePt);
  17451. æMM
  17452. æRT 112
  17453. æRI IV-60, N112
  17454. æC 
  17455. FindDItem returns the item number of the item containing the point specified, in
  17456. local coordinates, by thePt. If the point doesn’t lie within the item’s rectangle,
  17457. FindDItem returns –1. If there are overlapping items, it returns the item number of
  17458. the first item in the list containing the point. FindDItem is useful for changing the
  17459. cursor when it’s over a particular item.
  17460.  
  17461. Note:  FindDItem will return the item number of disabled items as well.
  17462.  
  17463. æKY NewCDialog
  17464. æFc Dialogs.h
  17465. æT Function
  17466. æTN AA4B
  17467. æD pascal DialogPtr NewCDialog(void *dStorage,const Rect *boundsRect,ConstStr255Param title,
  17468.     Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
  17469.     Handle items)
  17470.     = 0xAA4B; 
  17471. æDT DialogPtr myVariable = NewCDialog((void *) dStorage,(const Rect *) boundsRect,(ConstStr255Param) title,()
  17472.     Boolean visible,(short) procID,(WindowPtr) behind,(Boolean) goAwayFlag,(long) refCon,()
  17473.     Handle items);
  17474. æMM
  17475. æRI V-283
  17476. æC 
  17477. A new Dialog Manager routine has been added to support color dialogs: NewCDialog. 
  17478. Its parameters are identical to NewDialog, except that a cGrafPort is allocated
  17479. through a NewCWindow call instead of a call to NewWindow.
  17480.  
  17481. NewCDialog creates a dialog box as specified by its parameters and returns a cDialogPtr
  17482. to the new dialog. The first eight parameters (dStorage through refCon) are passed to
  17483. the Window Manager function NewCWindow, which creates the dialog window. The items
  17484. parameter is a handle to the dialog’s item list. You can get the items handle by
  17485. calling the Resource Manager to read the item list from the resource file into memory.
  17486.  
  17487. After calling NewCDialog, you can use SetWinColor to add a color table to the dialog.
  17488. This creates an auxiliary window record (auxWinRec) for the dialog window. You can
  17489. access this record with the GetAuxWin routine. The dialogCItem handle within the
  17490. auxWinRec points to the dialog item color table.
  17491.  
  17492. If the dialog’s content color isn’t white, it’s a good idea to call NewCDialog with
  17493. the visible flag set to FALSE. After the color table and color item list are installed,
  17494. use ShowWindow to display the dialog if the dialog is the frontmost window. If the
  17495. dialog is not in front, use ShowHide to display the dialog.
  17496.  
  17497. æKY newcdialog
  17498. æFc Dialogs.h
  17499. æT Function
  17500. æD DialogPtr newcdialog(void *dStorage,const Rect *boundsRect,char *title,
  17501.     Boolean visible,short procID,WindowPtr behind,Boolean goAwayFlag,long refCon,
  17502.     Handle items); 
  17503. æDT DialogPtr myVariable = newcdialog((void *) dStorage,(const Rect *) boundsRect,(char *) title,()
  17504.     Boolean visible,(short) procID,(WindowPtr) behind,(Boolean) goAwayFlag,(long) refCon,()
  17505.     Handle items);
  17506. æRI V-283
  17507. æC 
  17508. A new Dialog Manager routine has been added to support color dialogs: NewCDialog. 
  17509. Its parameters are identical to NewDialog, except that a cGrafPort is allocated
  17510. through a NewCWindow call instead of a call to NewWindow.
  17511.  
  17512. NewCDialog creates a dialog box as specified by its parameters and returns a cDialogPtr
  17513. to the new dialog. The first eight parameters (dStorage through refCon) are passed to
  17514. the Window Manager function NewCWindow, which creates the dialog window. The items
  17515. parameter is a handle to the dialog’s item list. You can get the items handle by
  17516. calling the Resource Manager to read the item list from the resource file into memory.
  17517.  
  17518. After calling NewCDialog, you can use SetWinColor to add a color table to the dialog.
  17519. This creates an auxiliary window record (auxWinRec) for the dialog window. You can
  17520. access this record with the GetAuxWin routine. The dialogCItem handle within the
  17521. auxWinRec points to the dialog item color table.
  17522.  
  17523. If the dialog’s content color isn’t white, it’s a good idea to call NewCDialog with
  17524. the visible flag set to FALSE. After the color table and color item list are installed,
  17525. use ShowWindow to display the dialog if the dialog is the frontmost window. If the
  17526. dialog is not in front, use ShowHide to display the dialog.
  17527.  
  17528. æKY GetAlrtStage
  17529. æFc Dialogs.h
  17530. æT Function
  17531. æD #define GetAlrtStage() (* (short*) 0x0A9A)
  17532. æDT #define myVariable = GetAlrtStage();
  17533. æRI I-422
  17534. æC  
  17535. GetAlrtStage returns the stage of the last occurrence of an alert, as a number from 0
  17536. to 3.
  17537.  
  17538. Assembly-language note:  Assembly-language programmers can get this number
  17539.                          by accessing the global variable ACount. In addition,
  17540.                          the global variable ANumber contains the resource ID
  17541.                          of the alert template of the last alert that occurred.
  17542.  
  17543. æKY ResetAlrtStage
  17544. æFc Dialogs.h
  17545. æT Function
  17546. æD pascal void ResetAlrtStage(void)
  17547.     = {0x4278,0x0A9A}; 
  17548. æDT ResetAlrtStage()(void);
  17549. æRI I-423
  17550. æC 
  17551. ResetAlrtStage resets the stage of the last occurrence of an alert so that the next
  17552. occurrence of that same alert will be treated as its first stage. This is useful, for
  17553. example, when you’ve used ParamText to change the text of an alert such that from the
  17554. user’s point of view it’s a different alert.
  17555.  
  17556. Assembly-language note:  Assembly-language programmers can set the global
  17557.                          variable ACount to –1 for the same effect.
  17558.  
  17559. æKY DlgCut
  17560. æFc Dialogs.h
  17561. æT Function
  17562. æD pascal void DlgCut(DialogPtr theDialog); 
  17563. æDT DlgCut((DialogPtr) theDialog);
  17564. æRT 215
  17565. æRI I-418, P-110
  17566. æC 
  17567. [Not in ROM]
  17568. DlgCut checks whether theDialog has any editText items and, if so, applies the TextEdit
  17569. procedure TECut to the currently selected editText item. (If the dialog record’s
  17570. editField is 0 or greater, DlgCut passes the contents of the textH field to TECut.)
  17571. You can call DlgCut to handle the editing command Cut when a modeless dialog window
  17572. is active.
  17573.  
  17574. Assembly-language note:  Assembly-language programmers can just read the
  17575.                          dialog record’s fields and call TextEdit directly.
  17576.  
  17577. æKY DlgPaste
  17578. æFc Dialogs.h
  17579. æT Function
  17580. æD pascal void DlgPaste(DialogPtr theDialog); 
  17581. æDT DlgPaste((DialogPtr) theDialog);
  17582. æMM
  17583. æRT 215
  17584. æRI I-418, P-110
  17585. æC  
  17586. [Not in ROM]
  17587.  
  17588. DlgPaste is the same as DlgCut (above) except that it calls TEPaste, for handling the
  17589. Paste command.
  17590.  
  17591. æKY DlgCopy
  17592. æFc Dialogs.h
  17593. æT Function
  17594. æD pascal void DlgCopy(DialogPtr theDialog); 
  17595. æDT DlgCopy((DialogPtr) theDialog);
  17596. æMM
  17597. æRT 215
  17598. æRI I-418, P-110
  17599. æC 
  17600. [Not in ROM]
  17601. DlgCopy is the same as DlgCut (above) except that it calls TECopy, for handling the
  17602. Copy command.
  17603.  
  17604. æKY DlgDelete
  17605. æFc Dialogs.h
  17606. æT Function
  17607. æD pascal void DlgDelete(DialogPtr theDialog); 
  17608. æDT DlgDelete((DialogPtr) theDialog);
  17609. æMM
  17610. æRT 215
  17611. æRI I-418, P-110
  17612. æC  
  17613. [Not in ROM]
  17614.  
  17615. DlgDelete is the same as DlgCut (above) except that it calls TEDelete, for handling
  17616. the Clear command.
  17617.  
  17618. æKY SetDAFont
  17619. æFc Dialogs.h
  17620. æT Function
  17621. æD pascal void SetDAFont(short fontNum)
  17622.     = {0x31DF,0x0AFA}; 
  17623. æDT SetDAFont((short) fontNum);
  17624. æRI I-412
  17625. æC 
  17626. For subsequently created dialogs and alerts, SetDAFont causes the font of the dialog
  17627. or alert window’s grafPort to be set to the font having the specified font number. If
  17628. you don’t call this procedure, the system font is used. SetDAFont affects statText
  17629. and editText items but not titles of controls, which are always in the system font.
  17630.  
  17631. Assembly-language note:  Assembly-language programmers can simply set
  17632.                          the global variable DlgFont to the desired font number.
  17633.  
  17634. æKY paramtext
  17635. æFc Dialogs.h
  17636. æT Function
  17637. æD void paramtext(char *param0,char *param1,char *param2,char *param3); 
  17638. æDT paramtext((char *) param0,(char *) param1,(char *) param2,(char *) param3);
  17639. æMM
  17640. æRI I-421
  17641. æC  
  17642. ParamText provides a means of substituting text in statText items:  param0 through
  17643. param3 will replace the special strings '^0' through '^3' in all statText items in
  17644. all subsequent dialog or alert boxes. Pass empty strings for parameters not used.
  17645.  
  17646. Assembly-language note:  Assembly-language programmers may pass NIL for
  17647.                          parameters not used or for strings that are not
  17648.                          to be changed.
  17649.  
  17650. For example, if the text is defined as 'Cannot open document ^0' and docName is a
  17651. string variable containing a document name that the user typed, you can call ParamText(docName,'
  17652. ',' ',' ')
  17653.  
  17654. Note:  All strings that may need to be translated to other languages should
  17655.        be stored in resource files.
  17656.  
  17657. Assembly-language note:  The Dialog Manager stores handles to the four
  17658.                          ParamText parameters in a global array named DAStrings.
  17659.  
  17660. æKY getitext
  17661. æFc Dialogs.h
  17662. æT Function
  17663. æD void getitext(Handle item,char *text); 
  17664. æDT getitext((Handle) item,(char *) text);
  17665. æRT 18
  17666. æRI I-422, N18-2
  17667. æC  
  17668. Given a handle to a statText or editText item in a dialog box, as returned by GetDItem,
  17669. GetIText returns the text of the item in the text parameter. (If the user typed more
  17670. than 255 characters in an editText item, GetIText returns only the first 255.)
  17671.  
  17672. æKY setitext
  17673. æFc Dialogs.h
  17674. æT Function
  17675. æD void setitext(Handle item,char *text); 
  17676. æDT setitext((Handle) item,(char *) text);
  17677. æMM
  17678. æRI I-422
  17679. æC 
  17680. Given a handle to a statText or editText item in a dialog box, as returned by GetDItem,
  17681. SetIText sets the text of the item to the specified text and draws the item. For
  17682. example, suppose the exact content of a dialog’s text item cannot be determined until
  17683. the application is running, but the display rectangle is defined in the resource
  17684. file:  Call GetDItem to get a handle to the item, and call SetIText with the desired
  17685. text.
  17686.  
  17687. æKY findditem
  17688. æFc Dialogs.h
  17689. æT Function
  17690. æD short findditem(DialogPtr theDialog,Point *thePt); 
  17691. æDT short myVariable = findditem((DialogPtr) theDialog,(Point *) thePt);
  17692. æRI IV-60, N112
  17693. æC 
  17694. FindDItem returns the item number of the item containing the point specified, in
  17695. local coordinates, by thePt. If the point doesn’t lie within the item’s rectangle,
  17696. FindDItem returns –1. If there are overlapping items, it returns the item number of
  17697. the first item in the list containing the point. FindDItem is useful for changing the
  17698. cursor when it’s over a particular item.
  17699.  
  17700. Note:  FindDItem will return the item number of disabled items as well.
  17701.  
  17702.  
  17703. æKY DisAsmLookup.h
  17704. æKL Disassembler
  17705. endOfModule
  17706. InitLookup
  17707. Lookup
  17708. LookupTrapName
  17709. ModifyOperand
  17710. showMacsBugSymbol
  17711. validMacsBugSymbol
  17712.  
  17713. _A0_
  17714. _A1_
  17715. _A2_
  17716. _A3_
  17717. _A4_
  17718. _A5_
  17719. _A6_
  17720. _A7_
  17721. _ABS_
  17722. _PC_
  17723. _TRAP_
  17724. LookupRegs
  17725.  
  17726. æKY Disassembler
  17727. æFc DisAsmLookup.h
  17728. æT Function
  17729. æD pascal void Disassembler(long DstAdjust,short *BytesUsed,Ptr FirstByte,
  17730.     char *Opcode,char *Operand,char *Comment,Ptr LookUpProc);
  17731. æDT Disassembler((long)DstAdjust,(short *)BytesUsed,(Ptr)FirstByte,
  17732.     (char *)Opcode,(char *)Operand,(char *)Comment,(Ptr)LookUpProc);
  17733. æC 
  17734. /* 
  17735.     Disassembler is a Pascal routine to be called to disassemble a sequence of
  17736.     bytes.  All MC68xxx, MC68881, and MC68851 instructions are supported.  The
  17737.     sequence of bytes to be disassembled are pointed to by FirstByte.  BytesUsed
  17738.     bytes starting at FirstByte are consumed by the disassembly, and the Opcode,
  17739.     Operand, and Comment strings returned as NULL TERMINATED Pascal strings (for
  17740.     easier manipulation with C).  The caller is then free to format or use the
  17741.     output strings any way appropriate to the application.
  17742.     
  17743.     Depending on the opcode and effective address(s) (EA's) to be disassembled,
  17744.     the Opcode, Operand, and Comment strings contain the following information:
  17745.     
  17746.     Case                     Opcode    Operand    Comment
  17747.     =======================================================================
  17748.     Non PC-relative EA's     op.sz     EA's
  17749.     PC-relative EA's         op.sz     EA's       ; address
  17750.     Toolbox traps            DC.W      $AXXX      ; TB XXXX
  17751.     OS traps                 DC.W      $AXXX      ; OS XXXX
  17752.     Invalid bytes            DC.W      $XXXX      ; ????
  17753.     Invalid byte #immediate  DC.W      $XXXX,...  ; op.sz #$??XX,EA
  17754.     =======================================================================
  17755.     
  17756.     For valid disassembly of processor instructions the appropriate MC68XXX
  17757.     opcode mnemonic is generated for the Opcode string along with a size
  17758.     attribute when required. The source and destination EA's are generated as the
  17759.     Operand along with a possible comment.  Comments start with a ';'.  Traps use
  17760.     a DC.W assembler directive as the Opcode with the trap word as the Operand
  17761.     and a comment indicating whether the trap is a toolbox or OS trap and what
  17762.     the trap number is.  As described later the caller can generate symbolic
  17763.     substitutions into EA's and provide names for traps.
  17764.     
  17765.     Invalid instructions cause the string 'DC.W' to be returned in the Opcode
  17766.     string. Operand is '$XXXX' (the invalid word) with a comment of '; ????'.
  17767.     BytesUsed is 2. This is similar to the trap call case except for the comment.
  17768.     
  17769.     A special case is made for immediate byte operands with a nonzero high order
  17770.     byte.  For example, the bytes $020011FF, when actually executed, would be
  17771.     interpreted as ANDI.B $FF,D0. The processor will IGNORE the high order byte
  17772.     of the immediate data! Thus, the bytes may be considered as valid.  Since the
  17773.     Disassembler has no way of knowing the context in which it is disassembling,
  17774.     it returns the Opcode as 'DC.W' as in the normal invalid case.  However, the
  17775.     Operand string shows ALL the words disassembled separated with commas and
  17776.     places the possibly valid disassembly in the Operand's comment indicating the
  17777.     nonzero bytes. Thus for the example $020011FF bytes, the Opcode will be
  17778.     'DC.W', the Operand will be '$0200,$11FF', and the Comment 
  17779.     '; ANDI.B #$??FF,D0'.  BytesUsed in this case would be 4.
  17780.     
  17781.     Note, the Operand EA's is syntatically similar to but NOT COMPATIBLE with the
  17782.     MPW assembler!  This is because the Disassembler generates byte hex constants
  17783.     as "$XX" and word hex constants as "$XXXX".  Negative values (e.g., $FF or
  17784.     $FFFF) produced by the Disassembler are treated as long word values by the MPW
  17785.     assembler.  Thus it is assumed that Disassembler output will NOT be used as
  17786.     MPW assembler input. If that is the goal, then the caller must convert strings
  17787.     of the form $XX or $XXXX in the Operand string to their decimal equivalent.
  17788.     The routine ModifyOperand is provided in this unit to aid with the conversion
  17789.     process.
  17790.     
  17791.     Since a PC-relative comment is an address, the only address that the
  17792.     Disassembler knows about is the address of the code pointed to by FirstByte.
  17793.     Generally, that may be a buffer that has no relation to "reality", i.e., the
  17794.     actual code loaded into the buffer.  Therefore, to allow the address comment
  17795.     to be mapped back to some actual address the caller may specify an adjustment
  17796.     factor, specified by DstAdjust that is ADDED to the value that normally would
  17797.     be placed in the comment.
  17798.     
  17799.     Operand effective address strings are generated as a function of the 
  17800.     effective address mode and a special case is made for A-trap opcode strings.
  17801.     In places where a possible symbolic reference could be substituted for an
  17802.     address (or a portion of an address), the Disassembler can call a user
  17803.     specified routine to do the substitution (using th LookupProc parameter
  17804.     described later).  The following table summarizes the generated effective
  17805.     addresses and where symbolic substitutions (S) can be made:
  17806.          
  17807.     Mode    Generated Effective Address  Effective Address with Substitution
  17808.     ========================================================================
  17809.       0     Dn                           Dn
  17810.       1     An                           An
  17811.       2     (An)                         (An)
  17812.       3     (An)+                        (An)+
  17813.       4     -(An)                        -(An)
  17814.       5     ∂(An)                        S(An) or just S (if An=A5, ∂≥0)
  17815.      6n     ∂(An,Xn.Size*Scale)          S(An,Xn.Size*Scale)
  17816.      6n     (BD,An,Xn.Size*Scale)        (S,An,Xn.Size*Scale)
  17817.      6n     ([BD,An],Xm.Size*Scale,OD)   ([S,An],Xm.Size*Scale,OD)
  17818.      6n     ([BD,An,Xn.Size*Scale],OD)   ([S,An,Xn.Size*Scale],OD)
  17819.      70     ∂                            S
  17820.      71     ∂                            S
  17821.      72     *±∂                          S
  17822.      73     *±∂(Xn.Size*Scale)           S(Xn.Size*Scale)
  17823.      73     (*±∂,Xn.Size*Scale)          (S,Xn.Size*Scale)
  17824.      73     ([*±∂],Xm.Size*Scale,OD)     ([S],Xm.Size*Scale,OD)
  17825.      73     ([*±∂,Xn.Size*Scale],OD)     ([S,Xn.Size*Scale],OD)
  17826.      74     #data                        #data
  17827.     ========================================================================
  17828.     
  17829.     For A-traps, the substitution can be performed to substitute for the DC.W
  17830.     opcode string.  If the substitution is made then the Disassembler will
  17831.     generate ,Sys and/or ,Immed flags as operands for Toolbox traps and
  17832.     ,AutoPop for OS traps when the bits in the trap word indicates these
  17833.     settings.
  17834.     
  17835.             |         Generated          |            Substituted
  17836.             | Opcode  Operand  Comment   | Opcode  Operand        Comment
  17837.     ========================================================================
  17838.     Toolbox | DC.W    $AXXX    ; TB XXXX | S       [,Sys][,Immed] ; AXXX
  17839.     OS      | DC.W    $AXXX    ; OS XXXX | S       [,AutoPop]     ; AXXX
  17840.     ========================================================================
  17841.     
  17842.     All displacements (∂, BD, OD) are hexadecimal values shown as a byte ($XX),
  17843.     word ($XXXX), or long ($XXXXXXXX) as appropriate. The *Scale is suppressed if
  17844.     1. The Size is W or L.  Note that effective address substitutions can only be
  17845.     made for "∂(An)", "BD,An", and "*±∂" cases.
  17846.         
  17847.     For all the effective address modes 5, 6n, 7n, and for A-traps, a coroutine (a
  17848.     procedure) whose address is specified by the LookupProc parameter is called by
  17849.     the Disassembler (if LookupProc is not NIL) to do the substitution (or A-trap
  17850.     comment) with a string returned by the proc.  It is assumed that the proc
  17851.     pointed to by LookupProc is a level 1 Pascal proc declared as follows:
  17852.     
  17853.     PROCEDURE Lookup(     PC:      UNIV Ptr;     {Addr of extension/trap word}
  17854.                          BaseReg: LookupRegs;   {Base register/lookup mode  }
  17855.                          Opnd:    UNIV LongInt; {Trap word, PC addr, disp.  }
  17856.                      VAR S:       DisAsmStr80); {Returned substitution      }
  17857.     
  17858.     where TYPE DisAsmStr80 = String[80];
  17859.       
  17860.     or in C,
  17861.     
  17862.     pascal void LookUp(Ptr         PC, 
  17863.                        LookupRegs  BaseReg, 
  17864.                        long        Opnd, 
  17865.                        char        *S); 
  17866.     
  17867.     PC      = Pointer to instruction extension word or A-trap word in the
  17868.               buffer pointed to by the Disassembler's FirstByte parameter.
  17869.               
  17870.     BaseReg = This determines the meaning of the Opnd value and supplies
  17871.               the base register for the "∂(An)", "BD,An", and "*±∂" cases.
  17872.               BaseReg may contain any one of the following values:
  17873.              
  17874.               _A0_   =  0 ==> A0
  17875.               _A1_   =  1 ==> A1
  17876.               _A2_   =  2 ==> A2
  17877.               _A3_   =  3 ==> A3
  17878.               _A4_   =  4 ==> A4
  17879.               _A5_   =  5 ==> A5
  17880.               _A6_   =  6 ==> A6
  17881.               _A7_   =  7 ==> A7
  17882.               _PC_   =  8 ==> PC-relative (special case)
  17883.               _ABS_  =  9 ==> Abs addr    (special case)
  17884.               _TRAP_ = 10 ==> Trap word   (special case)
  17885.               
  17886.               For absolute addressing (modes 70 and 71),  BaseReg contains _ABS_.
  17887.               For A-traps, BaseReg would contain _TRAP_.
  17888.     
  17889.     Opnd    = The contents of this LongInt is determined by the BaseReg parameter
  17890.               just described.
  17891.            
  17892.               For BaseReg = _TRAP_ (A-traps):
  17893.                   Opnd is the entire trap word. The high order 16 bits of Opnd are
  17894.                   zero.
  17895.     
  17896.               For BaseReg = _ABS_  (absolute effective address):
  17897.                   Opnd contains the (extended) 32-bit address specifed by the
  17898.                   instruction's effective address.  Such addresses would generally
  17899.                   be used to reference low memory globals on a Macintosh.
  17900.     
  17901.               For BaseReg = _PC_  (PC-relative effective address):
  17902.                   Opnd contains the 32-bit address represented by "*±∂" adjusted
  17903.                   by the Disassembler's DstAdjust parameter.
  17904.                   
  17905.               For BaseReg = _An_  (effective address with a base register):
  17906.                   Opnd contains the (sign-extended) 32-bit (base) displacement
  17907.                   from the instruction's effective address.
  17908.                   
  17909.                   In the Macintosh environment, a BaseReg specifying A5 implies
  17910.                   either global data references or Jump Table references. Positive
  17911.                   Opnd values with an A5 BaseReg thus mean Jump Table references,
  17912.                   while a negative offset would mean a global data reference.
  17913.                   Base registers of A6 or A7 would usually mean local data.
  17914.     
  17915.     S       = Pascal string returned from Lookup containing the effective address
  17916.               substitution string or a trap name for A-traps.  S is set to null
  17917.               PRIOR to calling Lookup.  If it is still null on return, the string
  17918.               is not used.  If not null, then for A-traps, the returned string is
  17919.               used as a opcode string. In all other cases the string is
  17920.               substituted as shown in the above table.
  17921.                
  17922.     Depending on the application, the caller has three choices on how to use the
  17923.     Disassembler and an associated Lookup proc:
  17924.     
  17925.     (1). The caller can call just the Disassembler and provide his own Lookup
  17926.          proc. In that case the calling conventions discussed above must be
  17927.          followed.
  17928.     
  17929.     (2). The caller can provide NIL for the LookupProc parameter, in which case,
  17930.          NO Lookup proc will be called.
  17931.          
  17932.     (3). The caller can call first InitLookup (described below, a proc provided
  17933.          with this unit) and pass the address of this unit's standard Lookup proc
  17934.          when Disassembler is called.  In this case all the control logic to
  17935.          determine the kind of substitution to be done is provided for the caller
  17936.          and all that need to be provided by the user are routines to look up any
  17937.          or all of the following:
  17938.          
  17939.          • PC-relative references
  17940.          • Jump Table references
  17941.          • Absolute address references
  17942.          • Trap names
  17943.          • References with offsets from base registers 
  17944. */
  17945.  
  17946. æKY endOfModule
  17947. æFc DisAsmLookup.h
  17948. æT Function
  17949. æD char *endOfModule(void *address,void *limit,char *symbol,void **nextModule);
  17950. æDT char myVariable = endOfModule((void *)address,(void *)limit,(char *)symbol,
  17951.     (void *)*nextModule);
  17952. æC 
  17953. /* 
  17954.     Check to see if the specified memory address, contains a RTS, JMP (A0) or
  17955.     RTD #n instruction immediately followed by a valid MacsBug symbol.  These
  17956.     sequences are the only ones which can determine an end of module when MacsBug
  17957.     symbols are present.  During the check, the instruction and its following
  17958.     MacsBug symbol must be fully contained in the bytes starting at the specified
  17959.     address parameter, up to, but not including, the byte pointed to by the limit
  17960.     parameter.
  17961.     
  17962.     If the end of module is NOT found, then NULL is returned as the function's
  17963.     result.  However, if a end of module is found, the MacsBug symbol is returned
  17964.     in symbol (if it is not NULL) as a null terminated Pascal string (with trailing
  17965.     blanks removed), and the functions returns the pointer to the start of the
  17966.     MacsBug symbol (i.e., address+2 for RTS or JMP (A0) and address+4 for RTD #n).
  17967.     This address may then be used as in input parameter to showMacsBugSymbol to
  17968.     convert the MacsBug symbol to a Disassembler operand string.
  17969.     
  17970.     Also returned in nextModule is where we think the FOLLOWING module begins. In
  17971.     the "old style" cases (see validMacsBugSymbol) this will always be 8 or 16
  17972.     bytes after the input address.  For new style the Apple Pascal and C cases this
  17973.     will depend on the symbol length, existence of a pad byte, and size of the
  17974.     constant (literal) area.  See validMacsBugSymbol for a description of valid
  17975.     MacsBug symbol formats. 
  17976. */
  17977.  
  17978. æKY InitLookup
  17979. æFc DisAsmLookup.h
  17980. æT Function
  17981. æD pascal void InitLookup(Ptr PCRelProc,Ptr JTOffProc,Ptr TrapProc,Ptr AbsAddrProc,
  17982.     Ptr IdProc);
  17983. æDT InitLookup((Ptr)PCRelProc,(Ptr)JTOffProc,(Ptr)TrapProc,
  17984.     (Ptr)AbsAddrProc,(Ptr)IdProc);
  17985. æC 
  17986. /* 
  17987.     Prepare for use of this unit's Lookup proc.  When Disassembler is called
  17988.     and the address of this unit's Lookup proc is specified, then for PC-relative,
  17989.     Jump Table references, A-traps, absolute addresses, and offsets from a base
  17990.     register, the associated level 1 Pascal proc specified here is called (if not
  17991.     NULL -- all five addresses are preset to NULL). The calls assume the following
  17992.     declarations for these procs (see Lookup, below for further details):
  17993.                                  
  17994.     PROCEDURE PCRelProc(Address: UNIV LongInt; 
  17995.                         VAR S:   UNIV DisAsmStr80);
  17996.     
  17997.     PROCEDURE JTOffProc(A5JTOffset: UNIV Integer;
  17998.                         VAR S:      UNIV DisAsmStr80);
  17999.     
  18000.     PROCEDURE TrapNameProc(TrapWord: UNIV Integer;
  18001.                            VAR S:     UNIV DisAsmStr80);
  18002.                             
  18003.     PROCEDURE AbsAddrProc(AbsAddr: UNIV LongInt;
  18004.                           VAR S:   UNIV DisAsmStr80);
  18005.     
  18006.     PROCEDURE IdProc(BaseReg: LookupRegs;
  18007.                      Offset:  UNIV LongInt;
  18008.                      VAR S:    UNIV DisAsmStr80);
  18009.     
  18010.     or in C,
  18011.     
  18012.     pascal void PCRelProc(long Address, char *S)
  18013.     
  18014.     pascal void JTOffProc(short A5JTOffset, char *S)
  18015.     
  18016.     pascal void TrapNameProc(unsigned short TrapWord, char *S)
  18017.     
  18018.     pascal void AbsAddrProc(long AbsAddr, char *S)
  18019.     
  18020.     pascal void IdProc(LookupRegs BaseReg, long Offset, char *S)
  18021.     
  18022.     Note: InitLookup contains initialized data which requires initializing at load
  18023.           time (this is of concern only to users with assembler main programs.
  18024. */
  18025.  
  18026. æKY Lookup
  18027. æFc DisAsmLookup.h
  18028. æT Function
  18029. æD pascal void Lookup(Ptr PC,LookupRegs BaseReg,long Opnd,char *S);
  18030. æDT Lookup((Ptr)PC,(LookupRegs)BaseReg,(long)Opnd,(char *)S);
  18031. æC 
  18032. /* 
  18033.     This is a standard Lookup proc available to the caller for calls to the
  18034.     Disassembler.  If the caller elects to use this proc, then InitLookup MUST be
  18035.     called prior to any calls to the Disassembler.  All the logic to determine the
  18036.     type of lookup is done by this proc.  For PC-relative, Jump Table references,
  18037.     A-traps, absolute addresses, and offsets from a base register, the associated
  18038.     level 1 Pascal proc specified in the InitLookup call (if not NULL) is called.
  18039.     
  18040.     This scheme simplifies the Lookup mechanism by allowing the caller to deal
  18041.     with just the problems related to the application.
  18042. */
  18043.  
  18044.  
  18045. æKY LookupRegs
  18046. _A0_
  18047. _A1_
  18048. _A2_
  18049. _A3_
  18050. _A4_
  18051. _A5_
  18052. _A6_
  18053. _A7_
  18054. _PC_
  18055. _ABS_
  18056. _TRAP_
  18057. æFc DisAsmLookup.h
  18058. æD enum {_A0_,_A1_,_A2_,_A3_,_A4_,_A5_,_A6_,_A7_,_PC_,_ABS_,_TRAP_}LookupRegs;
  18059. typedef unsigned char LookupRegs;
  18060.  
  18061.  
  18062. æKY LookupTrapName
  18063. æFc DisAsmLookup.h
  18064. æT Function
  18065. æD pascal void LookupTrapName(unsigned short TrapWord,char *S);
  18066. æDT LookupTrapName((unsigned short)TrapWord,(char *)S);
  18067. æC 
  18068. /* 
  18069.     This is a procedure provided to allow conversion of a trap instruction (in
  18070.      TrapWord) to its corresponding trap name (in S).  It is provided primarily for
  18071.      use with the Disassembler and its address may be passed to InitLookup above for
  18072.      use by this unit's Lookup routine.  Alternatively, there is nothing prohibiting
  18073.      the caller from using it directly for other purposes or by some other lookup
  18074.      proc.
  18075.     
  18076.     Note: The tables in this proc make the size of this proc about 9500 bytes.  The
  18077.          trap names are fully spelled out in upper and lower case.
  18078. */
  18079.  
  18080.  
  18081. æKY ModifyOperand
  18082. æFc DisAsmLookup.h
  18083. æT Function
  18084. æD pascal void ModifyOperand(char *operand);
  18085. æDT ModifyOperand((char *)operand);
  18086. æC 
  18087. /* 
  18088.     Scan an operand string, i.e., the null terminated Pascal string returned by
  18089.     the Disassembler (null MUST be present here) and modify negative hex values to
  18090.     negated positive value. For example, $FFFF(A5) would be modified to -$0001(A5).
  18091.     The operand to be processed is  passed as the function's parameter which is
  18092.     edited "in place" and returned to the caller.
  18093.     
  18094.     This routine is essentially a pattern matcher and attempts to only modify 2, 4,
  18095.     and 8 digit hex strings in the operand that "might" be offsets from a base
  18096.     register.  If the matching tests are passed, the same number of original digits
  18097.     are output (because that indicates a value's size -- byte, word, or long).
  18098.     
  18099.     For a hex string to be modified, the following tests must be passed:
  18100.     
  18101.     • There must have been exactly 2, 4, or 8 digits.
  18102.     
  18103.       Only hex strings $XX, $XXXX, and $XXXXXXXX are possible candidates because
  18104.       that is the only way the Disassembler generates offsets.
  18105.     
  18106.     • Hex string must be delimited by a "(" or a ",".
  18107.     
  18108.       The "(" allows offsets for $XXXX(An,...) and $XX(An,Xn) addressing modes.
  18109.       The comma allows for the MC68020 addressing forms.
  18110.     
  18111.     • The "$X..." must NOT be preceded by a "±".
  18112.     
  18113.       This eliminates the possibility of modifying the offset of a PC-relative
  18114.       addressing mode always generated in the form "*±$XXXX".
  18115.     
  18116.     • The "$X..." must NOT be preceded by a "#".
  18117.     
  18118.       This eliminates modifying immediate data.
  18119.     
  18120.     • Value must be negative.
  18121.     
  18122.       Negative values are the only values we modify.  A value $FFFF is modified to
  18123.       -$0001.
  18124. */
  18125.  
  18126.  
  18127. æKY showMacsBugSymbol
  18128. æFc DisAsmLookup.h
  18129. æT Function
  18130. æD char *showMacsBugSymbol(char *symStart,void *limit,char *operand,short *bytesUsed);
  18131. æDT char myVariable = showMacsBugSymbol((char *)symStart,(void *)limit,(char *)operand,
  18132.     (short *)bytesUsed);
  18133. æC 
  18134. /* 
  18135.     Format a MacsBug symbol as a operand of a DC.B directive.  The first one or two
  18136.     bytes of the symbol are generated as $80+'c' if they have there high high bits
  18137.     set.  All other characters are shown as characters in a string constant.  The
  18138.     pad byte, if present, is one is also shown as $00.
  18139.     
  18140.     This routine is called to check that the bytes pointed to by symStart represent
  18141.     a valid MacsBug symbol.  The symbol must be fully contained in the bytes
  18142.     starting at symStart, up to, but not including the byte pointed to by the limit
  18143.     parameter.
  18144.     
  18145.     When called, showMacsBugSymbol assumes that symStart is pointing at a valid
  18146.     MacsBug symbol as validated by the validMacsBugSymbol or endOfModule routines.
  18147.     As with validMacsBugSymbol, the symbol must be fully contained in the bytes
  18148.     starting at symStart up to, but not including, the byte pointed to by the end
  18149.     parameter.
  18150.     
  18151.     The string is returned in the 'operand' parameter as a null terminated Pascal
  18152.     string.  The function also returns a pointer to this string as its return
  18153.     value (NULL is returned only if the byte pointed to by the limit parameter is
  18154.     reached prior to processing the entire symbol -- which should not happen if
  18155.     properly validated).  The number of bytes used for the symbol is returned in
  18156.     bytesUsed.  Due to the way MacsBug symbols are encoded, bytesUsed may not
  18157.     necessarily be the same as the length of the operand string.
  18158.     
  18159.     A valid MacsBug symbol consists of the characters '_', '%', spaces, digits, and
  18160.     upper/lower case letters in a format determined by the first two bytes of the
  18161.     symbol as described in the validMacsBugSymbol routine.
  18162.     
  18163. */
  18164.  
  18165. æKY validMacsBugSymbol
  18166. æFc DisAsmLookup.h
  18167. æT Function
  18168. æD char *validMacsBugSymbol(char *symStart,void *limit,char *symbol);
  18169. æDT char myVariable = validMacsBugSymbol((char *)symStart,(void *)limit,
  18170.     (char *)symbol);
  18171. æC 
  18172. /* 
  18173.     Check that the bytes pointed to by symStart represents a valid MacsBug symbol.
  18174.     The symbol must be fully contained in the bytes starting at symStart, up to,
  18175.     but not including, the byte pointed to by the limit parameter.
  18176.     
  18177.     If a valid symbol is NOT found, then NULL is returned as the function's result.
  18178.     However, if a valid symbol is found, it is copied to symbol (if it is not NULL)
  18179.     as a null terminated Pascal string, and return a pointer to where we think the
  18180.     FOLLOWING module begins. In the "old style" cases (see below) this will always
  18181.     be 8 or 16 bytes after the input symStart.  For new style Apple Pascal and C
  18182.     cases this will depend on the symbol length, existence of a pad byte, and size
  18183.     of the constant (literal) area.  In all cases, trailing blanks are removed from
  18184.     the symbol.
  18185.     
  18186.     A valid MacsBug symbol consists of the characters '_', '%', spaces, digits, and
  18187.     upper/lower case letters in a format determined by the first two bytes of the
  18188.     symbol as follows:
  18189.     
  18190.      1st byte  | 2nd byte  |  Byte  |
  18191.        Range   |  Range    | Length | Comments
  18192.     ==============================================================================
  18193.      $20 - $7F | $20 - $7F |    8   | "Old style" MacsBug symbol format
  18194.      $A0 - $FF | $20 - $7F |    8   | "Old style" MacsBug symbol format
  18195.     ------------------------------------------------------------------------------
  18196.      $20 - $7F | $80 - $FF |   16   | "Old style" MacApp symbol ab==>b.a
  18197.      $A0 - $FF | $80 - $FF |   16   | "Old style" MacApp symbol ab==>b.a
  18198.     ------------------------------------------------------------------------------
  18199.      $80       | $01 - $FF |    n   | n = 2nd byte       (Apple Compiler symbol)
  18200.      $81 - $9F | $00 - $FF |    m   | m = 1st byte & $7F (Apple Compiler symbol)
  18201.     ==============================================================================
  18202.     
  18203.     The formats are determined by whether bit 7 is set in the first and second
  18204.     bytes.  This bit will removed when we find it or'ed into the first and/or
  18205.     second valid symbol characters.
  18206.     
  18207.     The first two formats in the above table are the basic "old style" (pre-
  18208.     existing) MacsBug formats. The first byte may or may not have bit 7 set the
  18209.     second byte is a valid symbol character.  The first byte (with bit 7 removed)
  18210.     and the next 7 bytes are assumed to comprise the symbol.
  18211.     
  18212.     The second pair of formats are also "old style" formats, but used for MacApp
  18213.     symbols.  Bit 7 set in the second character indicates these formats. The symbol
  18214.     is assumed to be 16 bytes with the second 8 bytes preceding the first 8 bytes
  18215.     in the generated symbol.  For example, 12345678abcdefgh represents the symbol
  18216.     abcdefgh.12345678.
  18217.     
  18218.     The last pair of formats are reserved by Apple and generated by the MPW Pascal
  18219.     and C compilers.  In these cases the value of the first byte is always between
  18220.     $80 and $9F, or with bit 7 removed, between $00 and $1F.  For $00, the second
  18221.     byte is the length of the symbol with that many bytes following the second
  18222.     byte (thus a max length of 255). Values $01 to $1F represent the length itself.
  18223.     A pad byte may follow these variable length cases if the symbol does not end
  18224.     on a word boundary.  Following the symbol and the possible pad byte is a word
  18225.     containing the size of the constants (literals) generated by the compiler.
  18226.     
  18227.     Note that if symStart actually does point to a valid MacsBug symbol, then you
  18228.     may use showMacsBugSymbol to convert the MacsBug symbol bytes to a string that
  18229.     could be used as a DC.B operand for disassembly purposes.  This string
  18230.     explicitly shows the MacsBug symbol encodings.
  18231. */
  18232.  
  18233.  
  18234. æKY DiskInit.h
  18235. æKL DIBadMount
  18236. dibadmount
  18237. DIFormat
  18238. DILoad
  18239. DIUnload
  18240. DIVerify
  18241. dizero
  18242. DIZero
  18243.  
  18244. HFSDefaults
  18245.  
  18246. æKY HFSDefaults
  18247. æFc DiskInit.h
  18248. æT struct
  18249. æD struct HFSDefaults {
  18250.     char sigWord[2]; /* signature word*/
  18251.     long abSize; /* allocation block size in bytes*/
  18252.     long clpSize; /* clump size in bytes*/
  18253.     long nxFreeFN; /* next free file number*/
  18254.     long btClpSize; /* B-Tree clump size in bytes*/
  18255.     short rsrv1; /* reserved*/
  18256.     short rsrv2; /* reserved*/
  18257.     short rsrv3; /* reserved*/
  18258. };
  18259.  
  18260. typedef struct HFSDefaults HFSDefaults;
  18261. æC 
  18262. »Formatting Hierarchical Volumes
  18263.  
  18264. The Disk Initialization Package must set certain volume characteristics when placing
  18265. a hierarchical file directory on a volume. Default values for these volume characteristics
  18266. are stored in the 128K ROM; this section is for advanced programmers who want to
  18267. substitute their own values. The record containing the default values, if defined in
  18268. Pascal, would look like this:
  18269.  
  18270. TYPE  HFSDefaults = PACKED RECORD
  18271.                       sigWord:    ARRAY[1..2] OF CHAR;    {signature word}
  18272.                       abSize:     LONGINT;    {allocation block size in bytes}
  18273.                       clpSize:    LONGINT;    {clump size in bytes}
  18274.                       nxFreeFN:   LONGINT;    {next free file number}
  18275.                       btClpSize:  LONGINT;    {B*-Tree clump size in bytes}
  18276.                       rsrv1:      INTEGER;    {reserved}
  18277.                       rsrv2:      INTEGER;    {reserved}
  18278.                       rsrv3:      INTEGER;    {reserved}
  18279.                     END;
  18280.  
  18281. The default values for these fields are as follows:
  18282.  
  18283.   Field    Default value
  18284.  
  18285.   sigWord     'BD'
  18286.   abSize       0
  18287.   clpSize      4 * abSize
  18288.   nxFreeFN    16
  18289.   btClpSize    0
  18290.  
  18291. To supply your own values for these fields, create a similar, nonrelocatable record
  18292. containing the desired values and place a pointer to it in the global variable FmtDefaults.
  18293. To restore the system defaults, simply clear FmtDefaults.
  18294.  
  18295. The sigWord must equal 'BD' (meaning “big disk”) for the volume to be recognized as a
  18296. hierarchical volume. If the specified allocation block size is 0, the allocation
  18297. block size is calculated according to the size of the volume:
  18298.  
  18299.   abSize = (1 + (volSize in blocks / 64K)) * 512 bytes
  18300.  
  18301. If the specified B*-tree clump size is 0, the clump size for both the catalog and
  18302. extent trees is calculated according to the size of the volume:
  18303.  
  18304.   btClpSize = (volSize in blocks)/128 * 512bytes
  18305.  
  18306. æKY DILoad
  18307. æFc DiskInit.h
  18308. æT Function
  18309. æD pascal void DILoad(void); 
  18310. æDT DILoad()(void);
  18311. æMM
  18312. æRI II-396
  18313. æC 
  18314. Assembly-language note:  The trap macro for the Disk Initialization Package
  18315.                          is _Pack2. The routine selectors are as follows:
  18316.  
  18317.                            diBadMount  .EQU    0
  18318.                            diLoad      .EQU    2
  18319.                            diUnload    .EQU    4
  18320.                            diFormat    .EQU    6
  18321.                            diVerify    .EQU    8
  18322.                            diZero      .EQU    10
  18323.  
  18324. DILoad reads the Disk Initialization Package, and its associated dialog and dialog
  18325. items, from the system resource file into memory and makes them unpurgeable.
  18326.  
  18327. Note:  DIFormat, DIVerify, and DIZero don’t need the dialog, so if you use
  18328.        only these routines you can call the Resource Manager function
  18329.        GetResource to read just the package resource into memory (and
  18330.        the Memory Manager procedure HNoPurge to make it unpurgeable).
  18331.  
  18332. æKY DIUnload
  18333. æFc DiskInit.h
  18334. æT Function
  18335. æD pascal void DIUnload(void); 
  18336. æDT DIUnload()(void);
  18337. æMM
  18338. æRI II-396
  18339. æC  
  18340. Assembly-language note:  The trap macro for the Disk Initialization Package
  18341.                          is _Pack2. The routine selectors are as follows:
  18342.  
  18343.                            diBadMount  .EQU    0
  18344.                            diLoad      .EQU    2
  18345.                            diUnload    .EQU    4
  18346.                            diFormat    .EQU    6
  18347.                            diVerify    .EQU    8
  18348.                            diZero      .EQU    10
  18349.  
  18350. DIUnload makes the Disk Initialization Package (and its associated dialog and dialog
  18351. items) purgeable.
  18352.  
  18353. æKY DIBadMount
  18354. æFc DiskInit.h
  18355. æT Function
  18356. æD pascal short DIBadMount(Point where,long evtMessage); 
  18357. æDT short myVariable = DIBadMount((Point) where,(long) evtMessage);
  18358. æRI DIBadMount function  II-396, N70-1, P-34, 168
  18359.  
  18360. æC 
  18361. Assembly-language note:  The trap macro for the Disk Initialization Package
  18362.                          is _Pack2. The routine selectors are as follows:
  18363.  
  18364.                            diBadMount  .EQU    0
  18365.                            diLoad      .EQU    2
  18366.                            diUnload    .EQU    4
  18367.                            diFormat    .EQU    6
  18368.                            diVerify    .EQU    8
  18369.                            diZero      .EQU    10
  18370.  
  18371. Call DIBadMount when a disk-inserted event occurs if the result code in the high-order
  18372. word of the associated event message indicates an error (that is, the result code is
  18373. other than noErr). Given the event message in evtMessage, DIBadMount evaluates the
  18374. result code and either ejects the disk or lets the user initialize and name it. The
  18375. low-order word of the event message contains the drive number. The where parameter
  18376. specifies the location (in global coordinates) of the top left corner of the dialog
  18377. box displayed by DIBadMount.
  18378.  
  18379. If the result code passed is extFSErr, memFullErr, nsDrvErr, paramErr, or volOnLinErr,
  18380. DIBadMount simply ejects the disk from the drive and returns the result code. If the
  18381. result code ioErr, badMDBErr, or noMacDskErr is passed, the error can be corrected by
  18382. initializing the disk; DIBadMount displays a dialog box that describes the problem
  18383. and asks whether the user wants to initialize the disk. For the result code ioErr,
  18384. the dialog box shown in Figure 1 is displayed. (This happens if the disk is brand
  18385. new.) For badMDBErr and noMacDskErr, DIBadMount displays a similar dialog box in
  18386. which the description of the problem is “This disk is damaged” and “This is not a
  18387. Macintosh disk”, respectively.
  18388.  
  18389. •••Refer to Figure 1.•••
  18390.  
  18391. Figure 1–Disk Initialization Dialog for IOErr
  18392.  
  18393. Note:  Before presenting the disk initialization dialog, DIBadMount checks
  18394.        whether the drive contains an already mounted volume; if so, it ejects
  18395.        the disk and returns 2 as its result. This will happen rarely and may
  18396.        reflect an error in your program (for example, you forgot to call
  18397.        DILoad and the user had to switch to the disk containing the system
  18398.        resource file).
  18399.  
  18400. If the user responds to the disk initialization dialog by clicking the Eject button,
  18401. DIBadMount ejects the disk and returns 1 as its result. If the Initialize button is
  18402. clicked, a box displaying the message “Initializing
  18403. disk...” appears, and DIBadMount attempts to initialize the disk. If initialization
  18404. fails, the disk is ejected and the user is informed as shown in Figure 2; after the
  18405. user clicks OK, DIBadMount returns a negative result code ranging from firstDskErr to
  18406. lastDskErr, indicating that a low-level disk error occurred.
  18407.  
  18408. •••Refer to Figure 2.•••
  18409.  
  18410. Figure 2–Initialization Failure Dialog
  18411.  
  18412. If the disk is successfully initialized, the dialog box in Figure 3 appears. After
  18413. the user names the disk and clicks OK, DIBadMount mounts the volume by calling the
  18414. File Manager function MountVol and returns MountVol’s result code
  18415. (noErr if no error occurs).
  18416.  
  18417. •••Refer to Figure 3.•••
  18418.  
  18419. Figure 3–Dialog for Naming a Disk
  18420.  
  18421. Result codes    noErr               No error
  18422.                 extFSErr            External file system
  18423.                 memFullErr          Not enough room in heap zone
  18424.                 nsDrvErr            No such drive
  18425.                 paramErr            Bad drive number
  18426.                 volOnLinErr         Volume already on-line
  18427.                 firstDskErr         Low-level disk error
  18428.                 through lastDskErr
  18429.  
  18430. Other results   1                   User clicked Eject
  18431.                 2                   Mounted volume in drive
  18432.  
  18433. æKY dibadmount
  18434. æFc DiskInit.h
  18435. æT Function
  18436. æD OSErr dibadmount(Point *where,long evtMessage); 
  18437. æDT OSErr myVariable = dibadmount((Point *) where,(long) evtMessage);
  18438. æC 
  18439. Assembly-language note:  The trap macro for the Disk Initialization Package
  18440.                          is _Pack2. The routine selectors are as follows:
  18441.  
  18442.                            diBadMount  .EQU    0
  18443.                            diLoad      .EQU    2
  18444.                            diUnload    .EQU    4
  18445.                            diFormat    .EQU    6
  18446.                            diVerify    .EQU    8
  18447.                            diZero      .EQU    10
  18448.  
  18449. Call DIBadMount when a disk-inserted event occurs if the result code in the high-order
  18450. word of the associated event message indicates an error (that is, the result code is
  18451. other than noErr). Given the event message in evtMessage, DIBadMount evaluates the
  18452. result code and either ejects the disk or lets the user initialize and name it. The
  18453. low-order word of the event message contains the drive number. The where parameter
  18454. specifies the location (in global coordinates) of the top left corner of the dialog
  18455. box displayed by DIBadMount.
  18456.  
  18457. If the result code passed is extFSErr, memFullErr, nsDrvErr, paramErr, or volOnLinErr,
  18458. DIBadMount simply ejects the disk from the drive and returns the result code. If the
  18459. result code ioErr, badMDBErr, or noMacDskErr is passed, the error can be corrected by
  18460. initializing the disk; DIBadMount displays a dialog box that describes the problem
  18461. and asks whether the user wants to initialize the disk. For the result code ioErr,
  18462. the dialog box shown in Figure 1 is displayed. (This happens if the disk is brand
  18463. new.) For badMDBErr and noMacDskErr, DIBadMount displays a similar dialog box in
  18464. which the description of the problem is “This disk is damaged” and “This is not a
  18465. Macintosh disk”, respectively.
  18466.  
  18467. •••Refer to Figure 1.•••
  18468.  
  18469. Figure 1–Disk Initialization Dialog for IOErr
  18470.  
  18471. Note:  Before presenting the disk initialization dialog, DIBadMount checks
  18472.        whether the drive contains an already mounted volume; if so, it ejects
  18473.        the disk and returns 2 as its result. This will happen rarely and may
  18474.        reflect an error in your program (for example, you forgot to call
  18475.        DILoad and the user had to switch to the disk containing the system
  18476.        resource file).
  18477.  
  18478. If the user responds to the disk initialization dialog by clicking the Eject button,
  18479. DIBadMount ejects the disk and returns 1 as its result. If the Initialize button is
  18480. clicked, a box displaying the message “Initializing
  18481. disk...” appears, and DIBadMount attempts to initialize the disk. If initialization
  18482. fails, the disk is ejected and the user is informed as shown in Figure 2; after the
  18483. user clicks OK, DIBadMount returns a negative result code ranging from firstDskErr to
  18484. lastDskErr, indicating that a low-level disk error occurred.
  18485.  
  18486. •••Refer to Figure 2.•••
  18487.  
  18488. Figure 2–Initialization Failure Dialog
  18489.  
  18490. If the disk is successfully initialized, the dialog box in Figure 3 appears. After
  18491. the user names the disk and clicks OK, DIBadMount mounts the volume by calling the
  18492. File Manager function MountVol and returns MountVol’s result code
  18493. (noErr if no error occurs).
  18494.  
  18495. •••Refer to Figure 3.•••
  18496.  
  18497. Figure 3–Dialog for Naming a Disk
  18498.  
  18499. Result codes    noErr               No error
  18500.                 extFSErr            External file system
  18501.                 memFullErr          Not enough room in heap zone
  18502.                 nsDrvErr            No such drive
  18503.                 paramErr            Bad drive number
  18504.                 volOnLinErr         Volume already on-line
  18505.                 firstDskErr         Low-level disk error
  18506.                 through lastDskErr
  18507.  
  18508. Other results   1                   User clicked Eject
  18509.                 2                   Mounted volume in drive
  18510.  
  18511. æKY DIFormat
  18512. æFc DiskInit.h
  18513. æT Function
  18514. æD pascal OSErr DIFormat(short drvNum); 
  18515. æDT OSErr myVariable = DIFormat((short) drvNum);
  18516. æMM
  18517. æRI II-398
  18518. æC 
  18519. Assembly-language note:  The trap macro for the Disk Initialization Package
  18520.                          is _Pack2. The routine selectors are as follows:
  18521.  
  18522.                            diBadMount  .EQU    0
  18523.                            diLoad      .EQU    2
  18524.                            diUnload    .EQU    4
  18525.                            diFormat    .EQU    6
  18526.                            diVerify    .EQU    8
  18527.                            diZero      .EQU    10
  18528.  
  18529. DIFormat formats the disk in the drive specified by the given drive number and returns
  18530. a result code indicating whether the formatting was completed successfully or failed.
  18531. Formatting a disk consists of writing special information onto it so that the Disk
  18532. Driver can read from and write to the disk.
  18533.  
  18534. Result codes    noErr               No error
  18535.                 firstDskErr         Low-level disk error
  18536.                 through lastDskErr
  18537.  
  18538. æKY DIVerify
  18539. æFc DiskInit.h
  18540. æT Function
  18541. æD pascal OSErr DIVerify(short drvNum); 
  18542. æDT OSErr myVariable = DIVerify((short) drvNum);
  18543. æMM
  18544. æRI II-398
  18545. æC 
  18546. Assembly-language note:  The trap macro for the Disk Initialization Package
  18547.                          is _Pack2. The routine selectors are as follows:
  18548.  
  18549.                            diBadMount  .EQU    0
  18550.                            diLoad      .EQU    2
  18551.                            diUnload    .EQU    4
  18552.                            diFormat    .EQU    6
  18553.                            diVerify    .EQU    8
  18554.                            diZero      .EQU    10
  18555.  
  18556. DIVerify verifies the format of the disk in the drive specified by the given drive
  18557. number; it reads each bit from the disk and returns a result code indicating whether
  18558. all bits were read successfully or not. DIVerify doesn’t affect the contents of the
  18559. disk itself.
  18560.  
  18561. Result codes    noErr               No error
  18562.                 firstDskErr         Low-level disk error
  18563.                 through lastDskErr
  18564.  
  18565. æKY DIZero
  18566. æFc DiskInit.h
  18567. æT Function
  18568. æD pascal OSErr DIZero(short drvNum,ConstStr255Param volName); 
  18569. æDT OSErr myVariable = DIZero((short) drvNum,(ConstStr255Param) volName);
  18570. æMM
  18571. æRT 70
  18572. æRI II-399, N70-2
  18573. æC 
  18574. Assembly-language note:  The trap macro for the Disk Initialization Package
  18575.                          is _Pack2. The routine selectors are as follows:
  18576.  
  18577.                            diBadMount  .EQU    0
  18578.                            diLoad      .EQU    2
  18579.                            diUnload    .EQU    4
  18580.                            diFormat    .EQU    6
  18581.                            diVerify    .EQU    8
  18582.                            diZero      .EQU    10
  18583.  
  18584. On the unmounted volume in the drive specified by the given drive number, DIZero
  18585. writes the volume information, a block map, and a file directory as for a volume with
  18586. no files; the volName parameter specifies the volume name to be included in the
  18587. volume information. This is the last step in initialization
  18588. (after formatting and verifying) and makes any files that are already on the volume
  18589. permanently inaccessible. If the operation fails, DIZero returns a result code indicating
  18590. that a low-level disk error occurred; otherwise, it mounts the volume by calling the
  18591. File Manager function MountVol and returns MountVol’s result code (noErr if no error
  18592. occurs).
  18593.  
  18594. Result codes    noErr              No error
  18595.                 badMDBErr          Bad master directory block
  18596.                 extFSErr           External file system
  18597.                 ioErr              I/O error
  18598.                 memFullErr         Not enough room in heap zone
  18599.                 noMacDskErr        Not a Macintosh disk
  18600.                 nsDrvErr           No such drive
  18601.                 paramErr           Bad drive number
  18602.                 volOnLinErr        Volume already on-line
  18603.                 firstDskErr        Low-level disk error
  18604.                 through lastDskErr
  18605.  
  18606. æKY dizero
  18607. æFc DiskInit.h
  18608. æT Function
  18609. æD OSErr dizero(short drvnum,char *volName); 
  18610. æDT OSErr myVariable = dizero((short) drvnum,(char *) volName);
  18611. æC 
  18612.  
  18613.  
  18614. æKY Disks.h
  18615. æKL DiskEject
  18616. DriveStatus
  18617. SetTagBuffer
  18618.  
  18619. DrvSts
  18620. DrvSts2
  18621.  
  18622. æKY DrvSts
  18623. æFc Disks.h
  18624. æT struct
  18625. æD struct DrvSts {
  18626.     short track;
  18627.     char writeProt;
  18628.     char diskInPlace;
  18629.     char installed;
  18630.     char sides;
  18631.     QElemPtr qLink;
  18632.     short qType;
  18633.     short dQDrive;
  18634.     short dQRefNum;
  18635.     short dQFSID;
  18636.     char twoSideFmt;
  18637.     char needsFlush;
  18638.     short diskErrs;
  18639. };
  18640.  
  18641. typedef struct DrvSts DrvSts;
  18642. æC 
  18643.  
  18644. æKY DrvSts2
  18645. æFc Disks.h
  18646. æT struct
  18647. æD struct DrvSts2 {
  18648.     short track;
  18649.     char writeProt;
  18650.     char diskInPlace;
  18651.     char installed;
  18652.     char sides;
  18653.     QElemPtr qLink;
  18654.     short qType;
  18655.     short dQDrive;
  18656.     short dQRefNum;
  18657.     short dQFSID;
  18658.     short driveSize;
  18659.     short driveS1;
  18660.     short driveType;
  18661.     short driveManf;
  18662.     short driveChar;
  18663.     char driveMisc;
  18664. };
  18665.  
  18666. typedef struct DrvSts2 DrvSts2;
  18667. æC 
  18668.  
  18669. æKY DiskEject
  18670. æFc Disks.h
  18671. æT Function
  18672. æD pascal OSErr DiskEject(short drvNum); 
  18673. æDT OSErr myVariable = DiskEject((short) drvNum);
  18674. æMM
  18675. æRI II-214
  18676. æC 
  18677. [Not in ROM]
  18678.  
  18679. Assembly-language note:  DiskEject is equivalent to a Control call with
  18680.                          csCode equal to the global constant ejectCode.
  18681.  
  18682. DiskEject ejects the disk from the internal drive if drvNum is 1, or from the external
  18683. drive if drvNum is 2.
  18684.  
  18685. Result codes    noErr       No error
  18686.                 nsDrvErr    No such drive
  18687.  
  18688. æKY SetTagBuffer
  18689. æFc Disks.h
  18690. æT Function
  18691. æD pascal OSErr SetTagBuffer(void *buffPtr); 
  18692. æDT OSErr myVariable = SetTagBuffer((void *) buffPtr);
  18693. æMM
  18694. æRI II-214
  18695. æC 
  18696. [Not in ROM]
  18697.  
  18698. Assembly-language note:  SetTagBuffer is equivalent to a Control call with
  18699.                          csCode equal to the global constant tgBuffCode.
  18700.  
  18701. An application can change the information used in the file tags buffer by calling
  18702. SetTagBuffer. The buffPtr parameter points to a buffer that contains the information
  18703. to be used. If buffPtr is NIL, the information in the file tags buffer isn’t changed.
  18704.  
  18705. If buffPtr isn’t NIL, every time the Disk Driver reads a sector from the disk, it
  18706. stores the file tags in the file tags buffer and in the buffer pointed to by buffPtr.
  18707. Every time the Disk Driver writes a sector onto the disk, it reads 12 bytes from the
  18708. buffer pointed to by buffPtr, places them in the file tags buffer, and then writes
  18709. them onto the disk.
  18710.  
  18711. The contents of the buffer pointed to by buffPtr are overwritten at the end of every
  18712. read request (which can be composed of a number of sectors) instead of at the end of
  18713. every sector. Each read request places 12 bytes in the buffer for each sector, always
  18714. beginning at the start of the buffer. This way an application can examine the file
  18715. tags for a number of sequentially read sectors. If a read request is composed of a
  18716. number of sectors, the Disk Driver places 12 bytes in the buffer for each sector. For
  18717. example, for a read request of five sectors, the Disk Driver will place 60 bytes in
  18718. the buffer.
  18719.  
  18720. Result codes    noErr    No error
  18721.  
  18722. æKY DriveStatus
  18723. æFc Disks.h
  18724. æT Function
  18725. æD pascal OSErr DriveStatus(short drvNum,DrvSts *status); 
  18726. æDT OSErr myVariable = DriveStatus((short) drvNum,(DrvSts *) status);
  18727. æMM
  18728. æRI II-215
  18729. æC 
  18730. [Not in ROM]
  18731.  
  18732. Assembly-language note:  DriveStatus is equivalent to a Status call with
  18733.                          csCode equal to the global constant drvStsCode;
  18734.                          status is returned in csParam through csParam+21.
  18735.  
  18736. DriveStatus returns information about the internal drive if drvNum is 1, or about the
  18737. external drive if drvNum is 2. The information is returned in a record of type DrvSts:
  18738.  
  18739. TYPE  DrvSts = RECORD
  18740.                  track:        INTEGER;     {current track}
  18741.                  writeProt:    SignedByte;  {bit 7=1 if volume is locked}
  18742.                  diskInPlace:  SignedByte;  {disk in place}
  18743.                  installed:    SignedByte;  {drive installed}
  18744.                  sides:        SignedByte;  {bit 7=0 if single-side drive}
  18745.                  qLink:        QElemPtr;    {next queue entry}
  18746.                  qType:        INTEGER;     {reserved for future use}
  18747.                  dQDrive:      INTEGER;     {drive number}
  18748.                  dQRefNum:     INTEGER;     {driver reference number}
  18749.                  dQFSID:       INTEGER;     {file-system identifier}
  18750.                  twoSideFmt:   SignedByte;  {-1 if two-sided disk}
  18751.                  needsFlush:   SignedByte;  {reserved for future use}
  18752.                  diskErrs:     INTEGER      {error count}
  18753.                END;
  18754.  
  18755. The diskInPlace field is 0 if there’s no disk in the drive, 1 or 2 if there is a disk
  18756. in the drive, or –4 to –1 if the disk was ejected in the last 1.5 seconds. The installed
  18757. field is 1 if the drive is connected to the Macintosh, 0 if the drive might be connected
  18758. to the Macintosh, and –1 if the drive isn’t installed. The value of twoSideFmt is
  18759. valid only when diskInPlace=2. The value of diskErrs is incremented every time an
  18760. error occurs internally within the Disk Driver.
  18761.  
  18762. Result codes    noErr       No error
  18763.                 nsDrvErr    No such drive
  18764.  
  18765.  
  18766. æKY Editions.h
  18767. æKL AssociateSection
  18768. CallEditionOpenerProc
  18769. CallFormatIOProc
  18770. CloseEdition
  18771. CreateEditionContainerFile
  18772. DeleteEditionContainerFile
  18773. EditionHasFormat
  18774. GetEditionFormatMark
  18775. GetEditionInfo
  18776. GetEditionOpenerProc
  18777. GetLastEditionContainerUsed
  18778. GetStandardFormats
  18779. GoToPublisherSection
  18780. InitEditionPack
  18781. IsRegisteredSection
  18782. NewPublisherDialog
  18783. NewPublisherExpDialog
  18784. NewSection
  18785. NewSubscriberDialog
  18786. NewSubscriberExpDialog
  18787. OpenEdition
  18788. OpenNewEdition
  18789. ReadEdition
  18790. RegisterSection
  18791. SectionOptionsDialog
  18792. SectionOptionsExpDialog
  18793. SetEditionFormatMark
  18794. SetEditionOpenerProc
  18795. UnRegisterSection
  18796. WriteEdition
  18797.  
  18798. EditionContainerSpec
  18799. EditionContainerSpecPtr
  18800. EditionInfoRecord
  18801. EditionOpenerParamBlock
  18802. EditionOpenerProcPtr
  18803. EditionOpenerVerb
  18804. EditionRefNum
  18805. emCancelSectionDialogRefCon
  18806. emGoToPubErrDialogRefCon
  18807. emHookAutoUpdateMode
  18808. emHookCancelSection
  18809. emHookGetEditionNow
  18810. emHookGoToPublisher
  18811. emHookManualUpdateMode
  18812. emHookRedrawPreview
  18813. emHookSendEditionNow
  18814. emOptionsDialogRefCon
  18815. eoCanSubscribe
  18816. eoClose
  18817. eoCloseNew
  18818. eoOpen
  18819. eoOpenNew
  18820. ExpDlgHookProcPtr
  18821. ExpModalFilterProcPtr
  18822. FormatIOParamBlock
  18823. FormatIOProcPtr
  18824. FormatIOVerb
  18825. FormatType
  18826. ioHasFormat
  18827. ioNewFormat
  18828. ioReadFormat
  18829. ioWriteFormat
  18830. kFormatLengthUnknown
  18831. kFormatListFormat
  18832. kPartNumberUnknown
  18833. kPartsNotUsed
  18834. kPICTEditionFileType
  18835. kPICTformatMask
  18836. kPreviewFormat
  18837. kPreviewHeight
  18838. kPreviewWidth
  18839. kPublisherDocAliasFormat
  18840. ksndEditionFileType
  18841. ksndFormatMask
  18842. kTEXTEditionFileType
  18843. kTEXTformatMask
  18844. kUnknownEditionFileType
  18845. NewPublisherReply
  18846. NewSubscriberReply
  18847. pumManual
  18848. pumOnSave
  18849. rSectionType
  18850. sectionCancelMsgID
  18851. sectionEventMsgClass
  18852. SectionHandle
  18853. SectionOptionsReply
  18854. SectionPtr
  18855. sectionReadMsgID
  18856. SectionRecord
  18857. sectionScrollMsgID
  18858. SectionType
  18859. sectionWriteMsgID
  18860. stPublisher
  18861. stSubscriber
  18862. sumAutomatic
  18863. sumManual
  18864. TimeStamp
  18865. UpdateMode
  18866.  
  18867. æKY rSectionType
  18868. æFc Editions.h
  18869. æT #define
  18870. æD #define rSectionType 'sect' /* ResType of saved SectionRecords */
  18871. æC 
  18872.  
  18873. æKY stSubscriber
  18874. æFc Editions.h
  18875. æT 
  18876. æD     stSubscriber = 0x01,
  18877. æC 
  18878.  
  18879. æKY stPublisher
  18880. æFc Editions.h
  18881. æT 
  18882. æD     stPublisher = 0x0A,
  18883. æC 
  18884.  
  18885. æKY sumAutomatic
  18886. æFc Editions.h
  18887. æT 
  18888. æD     sumAutomatic = 0, /* subscriber update mode - Automatically     */
  18889. æC 
  18890.  
  18891. æKY sumManual
  18892. æFc Editions.h
  18893. æT 
  18894. æD     sumManual = 1, /* subscriber update mode - Manually */
  18895. æC 
  18896.  
  18897. æKY pumOnSave
  18898. æFc Editions.h
  18899. æT 
  18900. æD     pumOnSave = 0, /* publisher update mode - OnSave            */
  18901. æC 
  18902.  
  18903. æKY pumManual
  18904. æFc Editions.h
  18905. æT 
  18906. æD     pumManual = 1, /* publisher update mode - Manually */
  18907. æC 
  18908.  
  18909. æKY kPartsNotUsed
  18910. æFc Editions.h
  18911. æT 
  18912. æD     kPartsNotUsed = 0,
  18913. æC 
  18914.  
  18915. æKY kPartNumberUnknown
  18916. æFc Editions.h
  18917. æT 
  18918. æD     kPartNumberUnknown = -1, /* misc */
  18919. æC 
  18920.  
  18921. æKY kPreviewWidth
  18922. æFc Editions.h
  18923. æT 
  18924. æD     kPreviewWidth = 120,
  18925. æC 
  18926.  
  18927. æKY kPreviewHeight
  18928. æFc Editions.h
  18929. æT 
  18930. æD     kPreviewHeight = 120,
  18931. æC 
  18932.  
  18933. æKY kPublisherDocAliasFormat
  18934. æFc Editions.h
  18935. æT #define
  18936. æD #define kPublisherDocAliasFormat 'alis'
  18937. æC 
  18938.  
  18939. æKY kPreviewFormat
  18940. æFc Editions.h
  18941. æT #define
  18942. æD #define kPreviewFormat 'prvw'
  18943. æC 
  18944.  
  18945. æKY kFormatListFormat
  18946. æFc Editions.h
  18947. æT #define
  18948. æD #define kFormatListFormat 'fmts'
  18949. æC 
  18950.  
  18951. æKY kPICTformatMask
  18952. æFc Editions.h
  18953. æT 
  18954. æD     kPICTformatMask = 1,
  18955. æC 
  18956.  
  18957. æKY kTEXTformatMask
  18958. æFc Editions.h
  18959. æT 
  18960. æD     kTEXTformatMask = 2,
  18961. æC 
  18962.  
  18963. æKY ksndFormatMask
  18964. æFc Editions.h
  18965. æT 
  18966. æD     ksndFormatMask = 4,
  18967. æC 
  18968.  
  18969. æKY kPICTEditionFileType
  18970. æFc Editions.h
  18971. æT #define
  18972. æD #define kPICTEditionFileType 'edtp'
  18973. æC 
  18974.  
  18975. æKY kTEXTEditionFileType
  18976. æFc Editions.h
  18977. æT #define
  18978. æD #define kTEXTEditionFileType 'edtt'
  18979. æC 
  18980.  
  18981. æKY ksndEditionFileType
  18982. æFc Editions.h
  18983. æT #define
  18984. æD #define ksndEditionFileType 'edts'
  18985. æC 
  18986.  
  18987. æKY kUnknownEditionFileType
  18988. æFc Editions.h
  18989. æT #define
  18990. æD #define kUnknownEditionFileType 'edtu'
  18991. æC 
  18992.  
  18993. æKY emHookRedrawPreview
  18994. æFc Editions.h
  18995. æT 
  18996. æD     emHookRedrawPreview = 150,
  18997. æC 
  18998.  
  18999. æKY emHookCancelSection
  19000. æFc Editions.h
  19001. æT 
  19002. æD     emHookCancelSection = 160,
  19003. æC 
  19004.  
  19005. æKY emHookGoToPublisher
  19006. æFc Editions.h
  19007. æT 
  19008. æD     emHookGoToPublisher = 161,
  19009. æC 
  19010.  
  19011. æKY emHookGetEditionNow
  19012. æFc Editions.h
  19013. æT 
  19014. æD     emHookGetEditionNow = 162,
  19015. æC 
  19016.  
  19017. æKY emHookSendEditionNow
  19018. æFc Editions.h
  19019. æT 
  19020. æD     emHookSendEditionNow = 162,
  19021. æC 
  19022.  
  19023. æKY emHookManualUpdateMode
  19024. æFc Editions.h
  19025. æT 
  19026. æD     emHookManualUpdateMode = 163,
  19027. æC 
  19028.  
  19029. æKY emHookAutoUpdateMode
  19030. æFc Editions.h
  19031. æT 
  19032. æD     emHookAutoUpdateMode = 164,
  19033. æC 
  19034.  
  19035. æKY emOptionsDialogRefCon
  19036. æFc Editions.h
  19037. æT #define
  19038. æD #define emOptionsDialogRefCon 'optn'
  19039. æC 
  19040.  
  19041. æKY emCancelSectionDialogRefCon
  19042. æFc Editions.h
  19043. æT #define
  19044. æD #define emCancelSectionDialogRefCon 'cncl'
  19045. æC 
  19046.  
  19047. æKY emGoToPubErrDialogRefCon
  19048. æFc Editions.h
  19049. æT #define
  19050. æD #define emGoToPubErrDialogRefCon 'gerr'
  19051. æC 
  19052.  
  19053. æKY kFormatLengthUnknown
  19054. æFc Editions.h
  19055. æT 
  19056. æD     kFormatLengthUnknown = -1,
  19057. æC 
  19058.  
  19059. æKY SectionType
  19060. æFc Editions.h
  19061. æT typedef
  19062. æD typedef char SectionType; /* one byte, stSubscriber or stPublisher */
  19063. æC 
  19064.  
  19065. æKY TimeStamp
  19066. æFc Editions.h
  19067. æT typedef
  19068. æD typedef unsigned long TimeStamp; /* seconds since 1904 */
  19069. æC 
  19070.  
  19071. æKY FormatType
  19072. æFc Editions.h
  19073. æT typedef
  19074. æD typedef unsigned long FormatType;/* similar to ResType */
  19075. æC 
  19076.  
  19077. æKY EditionRefNum
  19078. æFc Editions.h
  19079. æT typedef
  19080. æD typedef Handle EditionRefNum; /* used in Edition I/O */
  19081. æC 
  19082.  
  19083. æKY UpdateMode
  19084. æFc Editions.h
  19085. æT typedef
  19086. æD typedef short UpdateMode; /* sumAutomatic, pumSuspend, etc */
  19087. æC 
  19088.  
  19089. æKY SectionRecord
  19090. SectionPtr
  19091. SectionHandle
  19092. æFc Editions.h
  19093. æT struct
  19094. æD struct SectionRecord {
  19095.     SignedByte version; /* always 0x01 in system 7.0 */
  19096.     SectionType kind; /* stSubscriber or stPublisher */
  19097.     UpdateMode mode; /* auto or manual */
  19098.     TimeStamp mdDate; /* last change in document */
  19099.     long sectionID; /* app. specific, unique per document */
  19100.     long refCon; /* application specific */
  19101.     AliasHandle alias; /* handle to Alias Record */
  19102.     long subPart; /* which part of container file */
  19103.     struct SectionRecord **nextSection; /* for linked list of app's Sections */
  19104.     Handle controlBlock; /* used internally */
  19105.     EditionRefNum refNum; /* used internally */
  19106. };
  19107.  
  19108. typedef struct SectionRecord SectionRecord;
  19109. typedef SectionRecord *SectionPtr, **SectionHandle;
  19110. æC 
  19111.  
  19112. æKY EditionContainerSpec
  19113. EditionContainerSpecPtr
  19114. æFc Editions.h
  19115. æT struct
  19116. æD struct EditionContainerSpec {
  19117.     FSSpec theFile;
  19118.     ScriptCode theFileScript;
  19119.     long thePart;
  19120.     Str31 thePartName;
  19121.     ScriptCode thePartScript;
  19122. };
  19123.  
  19124. typedef struct EditionContainerSpec EditionContainerSpec;
  19125. typedef EditionContainerSpec *EditionContainerSpecPtr;
  19126. æC 
  19127.  
  19128. æKY EditionInfoRecord
  19129. æFc Editions.h
  19130. æT struct
  19131. æD struct EditionInfoRecord {
  19132.     TimeStamp crDate; /* date EditionContainer was created */
  19133.     TimeStamp mdDate; /* date of last change */
  19134.     OSType fdCreator; /* file creator */
  19135.     OSType fdType; /* file type */
  19136.     EditionContainerSpec container; /* the Edition */
  19137. };
  19138.  
  19139. typedef struct EditionInfoRecord EditionInfoRecord;
  19140. æC 
  19141.  
  19142. æKY NewPublisherReply
  19143. æFc Editions.h
  19144. æT struct
  19145. æD struct NewPublisherReply {
  19146.     Boolean canceled; /* O */
  19147.     Boolean replacing ;
  19148.     Boolean usePart; /* I */
  19149.     Handle preview; /* I */
  19150.     FormatType previewFormat; /* I */
  19151.     EditionContainerSpec container; /* I/O */
  19152. };
  19153.  
  19154. typedef struct NewPublisherReply NewPublisherReply;
  19155. æC 
  19156.  
  19157. æKY NewSubscriberReply
  19158. æFc Editions.h
  19159. æT struct
  19160. æD struct NewSubscriberReply {
  19161.     Boolean canceled; /* O */
  19162.     unsigned char formatsMask;
  19163.     EditionContainerSpec container; /*I/O*/
  19164. };
  19165.  
  19166. typedef struct NewSubscriberReply NewSubscriberReply;
  19167. æC 
  19168.  
  19169. æKY SectionOptionsReply
  19170. æFc Editions.h
  19171. æT struct
  19172. æD struct SectionOptionsReply {
  19173.     Boolean canceled; /* O */
  19174.     Boolean changed; /* O */
  19175.     SectionHandle sectionH; /* I */
  19176.     ResType action; /* O */
  19177. };
  19178.  
  19179. typedef struct SectionOptionsReply SectionOptionsReply;
  19180. æC 
  19181.  
  19182. æKY ExpModalFilterProcPtr
  19183. æFc Editions.h
  19184. æT typedef
  19185. æD typedef pascal Boolean (*ExpModalFilterProcPtr) (DialogPtr theDialog, EventRecord *theEvent,
  19186.  short itemOffset, short *itemHit, Ptr yourDataPtr);
  19187. æC 
  19188.  
  19189. æKY ExpDlgHookProcPtr
  19190. æFc Editions.h
  19191. æT typedef
  19192. æD typedef pascal short (*ExpDlgHookProcPtr) (short itemOffset,
  19193.   short itemHit, DialogPtr theDialog, Ptr yourDataPtr);
  19194. æC 
  19195.  
  19196. æKY FormatIOVerb
  19197. ioHasFormat
  19198. ioReadFormat
  19199. ioNewFormat
  19200. ioWriteFormat
  19201. æFc Editions.h
  19202. æT enum
  19203. æD enum {ioHasFormat,ioReadFormat,ioNewFormat,ioWriteFormat};
  19204. typedef unsigned char FormatIOVerb;
  19205. æC 
  19206.  
  19207. æKY FormatIOParamBlock
  19208. æFc Editions.h
  19209. æT struct
  19210. æD struct FormatIOParamBlock {
  19211.     long ioRefNum;
  19212.     FormatType format;
  19213.     long formatIndex;
  19214.     unsigned long offset;
  19215.     Ptr buffPtr;
  19216.     unsigned long buffLen;
  19217. };
  19218.  
  19219. typedef struct FormatIOParamBlock FormatIOParamBlock;
  19220. æC 
  19221.  
  19222. æKY FormatIOProcPtr
  19223. æFc Editions.h
  19224. æT typedef
  19225. æD typedef pascal short (*FormatIOProcPtr) (FormatIOVerb selector, FormatIOParamBlock *PB);
  19226. æC 
  19227.  
  19228. æKY EditionOpenerVerb
  19229. eoOpen
  19230. eoClose
  19231. eoOpenNew
  19232. eoCloseNew
  19233. eoCanSubscribe
  19234.  
  19235. æFc Editions.h
  19236. æT enum
  19237. æD enum {eoOpen,eoClose,eoOpenNew,eoCloseNew,eoCanSubscribe};
  19238. typedef unsigned char EditionOpenerVerb;
  19239. æC 
  19240.  
  19241. æKY EditionOpenerParamBlock
  19242. æFc Editions.h
  19243. æT struct
  19244. æD struct EditionOpenerParamBlock {
  19245.     EditionInfoRecord info;
  19246.     SectionHandle sectionH;
  19247.     FSSpecPtr document;
  19248.     OSType fdCreator;
  19249.     long ioRefNum;
  19250.     FormatIOProcPtr ioProc;
  19251.     Boolean success;
  19252.     unsigned char formatsMask;
  19253. };
  19254.  
  19255. typedef struct EditionOpenerParamBlock EditionOpenerParamBlock;
  19256. æC 
  19257.  
  19258. æKY EditionOpenerProcPtr
  19259. æFc Editions.h
  19260. æT typedef
  19261. æD typedef pascal short (*EditionOpenerProcPtr) (EditionOpenerVerb selector, FormatIOParamBlock *PB);
  19262. æC 
  19263.  
  19264. æKY sectionEventMsgClass
  19265. æFc Editions.h
  19266. æT #define
  19267. æD #define sectionEventMsgClass 'sect'
  19268. æC 
  19269.  
  19270. æKY sectionReadMsgID
  19271. æFc Editions.h
  19272. æT #define
  19273. æD #define sectionReadMsgID 'read'
  19274. æC 
  19275.  
  19276. æKY sectionWriteMsgID
  19277. æFc Editions.h
  19278. æT #define
  19279. æD #define sectionWriteMsgID 'writ'
  19280. æC 
  19281.  
  19282. æKY sectionScrollMsgID
  19283. æFc Editions.h
  19284. æT #define
  19285. æD #define sectionScrollMsgID 'scrl'
  19286. æC 
  19287.  
  19288. æKY sectionCancelMsgID
  19289. æFc Editions.h
  19290. æT #define
  19291. æD #define sectionCancelMsgID 'cncl'
  19292. æC 
  19293.  
  19294. æKY InitEditionPack
  19295. æFc Editions.h
  19296. æT Function
  19297. æTN A82D
  19298. æD pascal OSErr InitEditionPack(void)
  19299.     = {0x3F3C,0x0011,0x303C,0x0100,0xA82D}; 
  19300. æDT OSErr myVariable = InitEditionPack()(void);
  19301. æC 
  19302.  
  19303. æKY NewSection
  19304. æFc Editions.h
  19305. æT Function
  19306. æTN A82D
  19307. æD pascal OSErr NewSection(const EditionContainerSpec *container,
  19308.                         const FSSpec *sectionDocument,
  19309.                         SectionType kind,
  19310.                         long sectionID,
  19311.                         UpdateMode initalMode,
  19312.                         SectionHandle *sectionH)
  19313.     = {0x303C,0x0A02,0xA82D}; 
  19314. æDT OSErr myVariable = NewSection((const EditionContainerSpec *) container,(
  19315.                         const FSSpec) * sectionDocument,()
  19316.                         SectionType kind,()
  19317.                         long sectionID,()
  19318.                         UpdateMode initalMode,(
  19319.                         SectionHandle) * sectionH);
  19320. æC 
  19321.  
  19322. æKY RegisterSection
  19323. æFc Editions.h
  19324. æT Function
  19325. æTN A82D
  19326. æD pascal OSErr RegisterSection(const FSSpec *sectionDocument,
  19327.                              SectionHandle sectionH,
  19328.                              Boolean *aliasWasUpdated)
  19329.     = {0x303C,0x0604,0xA82D}; 
  19330. æDT OSErr myVariable = RegisterSection((const FSSpec *) sectionDocument,()
  19331.                              SectionHandle sectionH,(
  19332.                              Boolean) * aliasWasUpdated);
  19333. æC 
  19334.  
  19335. æKY UnRegisterSection
  19336. æFc Editions.h
  19337. æT Function
  19338. æTN A82D
  19339. æD pascal OSErr UnRegisterSection(SectionHandle sectionH)
  19340.     = {0x303C,0x0206,0xA82D}; 
  19341. æDT OSErr myVariable = UnRegisterSection((SectionHandle) sectionH);
  19342. æC 
  19343.  
  19344. æKY IsRegisteredSection
  19345. æFc Editions.h
  19346. æT Function
  19347. æTN A82D
  19348. æD pascal OSErr IsRegisteredSection(SectionHandle sectionH)
  19349.     = {0x303C,0x0208,0xA82D}; 
  19350. æDT OSErr myVariable = IsRegisteredSection((SectionHandle) sectionH);
  19351. æC 
  19352.  
  19353. æKY AssociateSection
  19354. æFc Editions.h
  19355. æT Function
  19356. æTN A82D
  19357. æD pascal OSErr AssociateSection(SectionHandle sectionH,
  19358.                               const FSSpec *newSectionDocument)
  19359.     = {0x303C,0x040C,0xA82D}; 
  19360. æDT OSErr myVariable = AssociateSection((SectionHandle) sectionH,(
  19361.                               const FSSpec) * newSectionDocument);
  19362. æC 
  19363.  
  19364. æKY CreateEditionContainerFile
  19365. æFc Editions.h
  19366. æT Function
  19367. æTN A82D
  19368. æD pascal OSErr CreateEditionContainerFile(const FSSpec *editionFile,
  19369.                                         OSType fdCreator,
  19370.                                         ScriptCode editionFileNameScript)
  19371.     = {0x303C,0x050E,0xA82D}; 
  19372. æDT OSErr myVariable = CreateEditionContainerFile((const FSSpec *) editionFile,()
  19373.                                         OSType fdCreator,()
  19374.                                         ScriptCode editionFileNameScript);
  19375. æC 
  19376.  
  19377. æKY DeleteEditionContainerFile
  19378. æFc Editions.h
  19379. æT Function
  19380. æTN A82D
  19381. æD pascal OSErr DeleteEditionContainerFile(const FSSpec *editionFile)
  19382.     = {0x303C,0x0210,0xA82D}; 
  19383. æDT OSErr myVariable = DeleteEditionContainerFile((const FSSpec *) editionFile);
  19384. æC 
  19385.  
  19386. æKY OpenEdition
  19387. æFc Editions.h
  19388. æT Function
  19389. æTN A82D
  19390. æD pascal OSErr OpenEdition(SectionHandle subscriberSectionH,
  19391.                          EditionRefNum *refNum)
  19392.     = {0x303C,0x0412,0xA82D}; 
  19393. æDT OSErr myVariable = OpenEdition((SectionHandle) subscriberSectionH,(
  19394.                          EditionRefNum) * refNum);
  19395. æC 
  19396.  
  19397. æKY OpenNewEdition
  19398. æFc Editions.h
  19399. æT Function
  19400. æTN A82D
  19401. æD pascal OSErr OpenNewEdition(SectionHandle publisherSectionH,
  19402.                             OSType fdCreator,
  19403.                             const FSSpec *publisherSectionDocument,
  19404.                             EditionRefNum *refNum)
  19405.     = {0x303C,0x0814,0xA82D}; 
  19406. æDT OSErr myVariable = OpenNewEdition((SectionHandle) publisherSectionH,()
  19407.                             OSType fdCreator,(
  19408.                             const FSSpec) * publisherSectionDocument,(
  19409.                             EditionRefNum) * refNum);
  19410. æC 
  19411.  
  19412. æKY CloseEdition
  19413. æFc Editions.h
  19414. æT Function
  19415. æTN A82D
  19416. æD pascal OSErr CloseEdition(EditionRefNum whichEdition,
  19417.                           Boolean successful)
  19418.     = {0x303C,0x0316,0xA82D}; 
  19419. æDT OSErr myVariable = CloseEdition((EditionRefNum) whichEdition,()
  19420.                           Boolean successful);
  19421. æC 
  19422.  
  19423. æKY EditionHasFormat
  19424. æFc Editions.h
  19425. æT Function
  19426. æTN A82D
  19427. æD pascal OSErr EditionHasFormat(EditionRefNum whichEdition,
  19428.                               FormatType whichFormat,
  19429.                               Size *formatSize)
  19430.     = {0x303C,0x0618,0xA82D}; 
  19431. æDT OSErr myVariable = EditionHasFormat((EditionRefNum) whichEdition,()
  19432.                               FormatType whichFormat,(
  19433.                               Size) * formatSize);
  19434. æC 
  19435.  
  19436. æKY ReadEdition
  19437. æFc Editions.h
  19438. æT Function
  19439. æTN A82D
  19440. æD pascal OSErr ReadEdition(EditionRefNum whichEdition,
  19441.                          FormatType whichFormat,
  19442.                          void *buffPtr,
  19443.                          Size *buffLen)
  19444.     = {0x303C,0x081A,0xA82D}; 
  19445. æDT OSErr myVariable = ReadEdition((EditionRefNum) whichEdition,()
  19446.                          FormatType whichFormat,(
  19447.                          void) * buffPtr,(
  19448.                          Size) * buffLen);
  19449. æC 
  19450.  
  19451. æKY WriteEdition
  19452. æFc Editions.h
  19453. æT Function
  19454. æTN A82D
  19455. æD pascal OSErr WriteEdition(EditionRefNum whichEdition,
  19456.                           FormatType whichFormat,
  19457.                           const void *buffPtr,
  19458.                           Size buffLen)
  19459.     = {0x303C,0x081C,0xA82D}; 
  19460. æDT OSErr myVariable = WriteEdition((EditionRefNum) whichEdition,()
  19461.                           FormatType whichFormat,(
  19462.                           const void) * buffPtr,()
  19463.                           Size buffLen);
  19464. æC 
  19465.  
  19466. æKY GetEditionFormatMark
  19467. æFc Editions.h
  19468. æT Function
  19469. æTN A82D
  19470. æD pascal OSErr GetEditionFormatMark(EditionRefNum whichEdition,
  19471.                                   FormatType whichFormat,
  19472.                                   unsigned long *currentMark)
  19473.     = {0x303C,0x061E,0xA82D}; 
  19474. æDT OSErr myVariable = GetEditionFormatMark((EditionRefNum) whichEdition,()
  19475.                                   FormatType whichFormat,(
  19476.                                   unsigned long) * currentMark);
  19477. æC 
  19478.  
  19479. æKY SetEditionFormatMark
  19480. æFc Editions.h
  19481. æT Function
  19482. æTN A82D
  19483. æD pascal OSErr SetEditionFormatMark(EditionRefNum whichEdition,
  19484.                                   FormatType whichFormat,
  19485.                                   unsigned long setMarkTo)
  19486.     = {0x303C,0x0620,0xA82D}; 
  19487. æDT OSErr myVariable = SetEditionFormatMark((EditionRefNum) whichEdition,()
  19488.                                   FormatType whichFormat,(
  19489.                                   unsigned) long setMarkTo);
  19490. æC 
  19491.  
  19492. æKY GetEditionInfo
  19493. æFc Editions.h
  19494. æT Function
  19495. æTN A82D
  19496. æD pascal OSErr GetEditionInfo(const SectionHandle sectionH,
  19497.                             EditionInfoRecord *editionInfo)
  19498.     = {0x303C,0x0422,0xA82D}; 
  19499. æDT OSErr myVariable = GetEditionInfo((const SectionHandle) sectionH,(
  19500.                             EditionInfoRecord) * editionInfo);
  19501. æC 
  19502.  
  19503. æKY GoToPublisherSection
  19504. æFc Editions.h
  19505. æT Function
  19506. æTN A82D
  19507. æD pascal OSErr GoToPublisherSection(const EditionContainerSpec *container)
  19508.     = {0x303C,0x0224,0xA82D}; 
  19509. æDT OSErr myVariable = GoToPublisherSection((const EditionContainerSpec *) container);
  19510. æC 
  19511.  
  19512. æKY GetLastEditionContainerUsed
  19513. æFc Editions.h
  19514. æT Function
  19515. æTN A82D
  19516. æD pascal OSErr GetLastEditionContainerUsed(EditionContainerSpec *container)
  19517.     = {0x303C,0x0226,0xA82D}; 
  19518. æDT OSErr myVariable = GetLastEditionContainerUsed((EditionContainerSpec *) container);
  19519. æC 
  19520.  
  19521. æKY GetStandardFormats
  19522. æFc Editions.h
  19523. æT Function
  19524. æTN A82D
  19525. æD pascal OSErr GetStandardFormats(const EditionContainerSpec *container,
  19526.                                 FormatType *previewFormat,
  19527.                                 Handle preview,
  19528.                                 Handle publisherAlias,
  19529.                                 Handle formats)
  19530.     = {0x303C,0x0A28,0xA82D}; 
  19531. æDT OSErr myVariable = GetStandardFormats((const EditionContainerSpec *) container,(
  19532.                                 FormatType) * previewFormat,()
  19533.                                 Handle preview,()
  19534.                                 Handle publisherAlias,()
  19535.                                 Handle formats);
  19536. æC 
  19537.  
  19538. æKY GetEditionOpenerProc
  19539. æFc Editions.h
  19540. æT Function
  19541. æTN A82D
  19542. æD pascal OSErr GetEditionOpenerProc(EditionOpenerProcPtr *opener)
  19543.     = {0x303C,0x022A,0xA82D}; 
  19544. æDT OSErr myVariable = GetEditionOpenerProc((EditionOpenerProcPtr *) opener);
  19545. æC 
  19546.  
  19547. æKY SetEditionOpenerProc
  19548. æFc Editions.h
  19549. æT Function
  19550. æTN A82D
  19551. æD pascal OSErr SetEditionOpenerProc(EditionOpenerProcPtr opener)
  19552.     = {0x303C,0x022C,0xA82D}; 
  19553. æDT OSErr myVariable = SetEditionOpenerProc((EditionOpenerProcPtr) opener);
  19554. æC 
  19555.  
  19556. æKY CallEditionOpenerProc
  19557. æFc Editions.h
  19558. æT Function
  19559. æTN A82D
  19560. æD pascal OSErr CallEditionOpenerProc(EditionOpenerVerb selector,
  19561.                                    EditionOpenerParamBlock *PB,
  19562.                                    EditionOpenerProcPtr routine)
  19563.     = {0x303C,0x052E,0xA82D}; 
  19564. æDT OSErr myVariable = CallEditionOpenerProc((EditionOpenerVerb) selector,(
  19565.                                    EditionOpenerParamBlock) * PB,()
  19566.                                    EditionOpenerProcPtr routine);
  19567. æC 
  19568.  
  19569. æKY CallFormatIOProc
  19570. æFc Editions.h
  19571. æT Function
  19572. æTN A82D
  19573. æD pascal OSErr CallFormatIOProc(FormatIOVerb selector,
  19574.                               FormatIOParamBlock *PB,
  19575.                               FormatIOProcPtr routine)
  19576.     = {0x303C,0x0530,0xA82D}; 
  19577. æDT OSErr myVariable = CallFormatIOProc((FormatIOVerb) selector,(
  19578.                               FormatIOParamBlock) * PB,()
  19579.                               FormatIOProcPtr routine);
  19580. æC 
  19581.  
  19582. æKY NewSubscriberDialog
  19583. æFc Editions.h
  19584. æT Function
  19585. æTN A82D
  19586. æD pascal OSErr NewSubscriberDialog(NewSubscriberReply *reply)
  19587.     = {0x303C,0x0232,0xA82D}; 
  19588. æDT OSErr myVariable = NewSubscriberDialog((NewSubscriberReply *) reply);
  19589. æC 
  19590.  
  19591. æKY NewSubscriberExpDialog
  19592. æFc Editions.h
  19593. æT Function
  19594. æTN A82D
  19595. æD pascal OSErr NewSubscriberExpDialog(NewSubscriberReply *reply,
  19596.                                     Point where,
  19597.                                     short expansionDITLresID,
  19598.                                     ExpDlgHookProcPtr dlgHook,
  19599.                                     ExpModalFilterProcPtr filterProc,
  19600.                                     void *yourDataPtr)
  19601.     = {0x303C,0x0B34,0xA82D}; 
  19602. æDT OSErr myVariable = NewSubscriberExpDialog((NewSubscriberReply *) reply,()
  19603.                                     Point where,()
  19604.                                     short expansionDITLresID,()
  19605.                                     ExpDlgHookProcPtr dlgHook,()
  19606.                                     ExpModalFilterProcPtr filterProc,(
  19607.                                     void) * yourDataPtr);
  19608. æC 
  19609.  
  19610. æKY NewPublisherDialog
  19611. æFc Editions.h
  19612. æT Function
  19613. æTN A82D
  19614. æD pascal OSErr NewPublisherDialog(NewPublisherReply *reply)
  19615.     = {0x303C,0x0236,0xA82D}; 
  19616. æDT OSErr myVariable = NewPublisherDialog((NewPublisherReply *) reply);
  19617. æC 
  19618.  
  19619. æKY NewPublisherExpDialog
  19620. æFc Editions.h
  19621. æT Function
  19622. æTN A82D
  19623. æD pascal OSErr NewPublisherExpDialog(NewPublisherReply *reply,
  19624.                                    Point where,
  19625.                                    short expansionDITLresID,
  19626.                                    ExpDlgHookProcPtr dlgHook,
  19627.                                    ExpModalFilterProcPtr filterProc,
  19628.                                    void *yourDataPtr)
  19629.     = {0x303C,0x0B38,0xA82D}; 
  19630. æDT OSErr myVariable = NewPublisherExpDialog((NewPublisherReply *) reply,()
  19631.                                    Point where,()
  19632.                                    short expansionDITLresID,()
  19633.                                    ExpDlgHookProcPtr dlgHook,()
  19634.                                    ExpModalFilterProcPtr filterProc,(
  19635.                                    void) * yourDataPtr);
  19636. æC 
  19637.  
  19638. æKY SectionOptionsDialog
  19639. æFc Editions.h
  19640. æT Function
  19641. æTN A82D
  19642. æD pascal OSErr SectionOptionsDialog(SectionOptionsReply *reply)
  19643.     = {0x303C,0x023A,0xA82D}; 
  19644. æDT OSErr myVariable = SectionOptionsDialog((SectionOptionsReply *) reply);
  19645. æC 
  19646.  
  19647. æKY SectionOptionsExpDialog
  19648. æFc Editions.h
  19649. æT Function
  19650. æTN A82D
  19651. æD pascal OSErr SectionOptionsExpDialog(SectionOptionsReply *reply,
  19652.                                      Point where,
  19653.                                      short expansionDITLresID,
  19654.                                      ExpDlgHookProcPtr dlgHook,
  19655.                                      ExpModalFilterProcPtr filterProc,
  19656.                                      void *yourDataPtr)
  19657.     = {0x303C,0x0B3C,0xA82D}; 
  19658. æDT OSErr myVariable = SectionOptionsExpDialog((SectionOptionsReply *) reply,()
  19659.                                      Point where,()
  19660.                                      short expansionDITLresID,()
  19661.                                      ExpDlgHookProcPtr dlgHook,()
  19662.                                      ExpModalFilterProcPtr filterProc,(
  19663.                                      void) * yourDataPtr);
  19664. æC 
  19665.  
  19666.  
  19667. æKY EPPC.h
  19668. æKL AcceptHighLevelEvent
  19669. GetPortNameFromProcessSerialNumber
  19670. GetProcessSerialNumberFromPortName
  19671. GetSpecificHighLevelEvent
  19672. PostHighLevelEvent
  19673.  
  19674. bufferIsSmall
  19675. connectionInvalid
  19676. GetSpecificFilterProcPtr
  19677. HighLevelEventMsg
  19678. HighLevelEventMsgClass
  19679. HighLevelEventMsgHdl
  19680. HighLevelEventMsgPtr
  19681. kHighLevelEvent
  19682. msgWasFullyAccepted
  19683. msgWasNotAccepted
  19684. msgWasPartiallyAccepted
  19685. nAttnMsg
  19686. noOutstandingHLE
  19687. noUserInteractionAllowed
  19688. nReturnReceipt
  19689. priorityMask
  19690. receiverIDisPSN
  19691. receiverIDisSessionID
  19692. receiverIDisSignature
  19693. receiverIDisTargetID
  19694. receiverIDMask
  19695. rtrnReceiptMsgID
  19696. SenderID
  19697. SenderIDPtr
  19698. systemOptionsMask
  19699. TargetID
  19700. TargetIDHdl
  19701. TargetIDPtr
  19702.  
  19703. æKY kHighLevelEvent
  19704. æFc EPPC.h
  19705. æT 
  19706. æD     kHighLevelEvent = 23,
  19707. æC 
  19708.  
  19709. æKY receiverIDMask
  19710. æFc EPPC.h
  19711. æT 
  19712. æD     receiverIDMask = 0x0000F000,
  19713. æC 
  19714.  
  19715. æKY receiverIDisPSN
  19716. æFc EPPC.h
  19717. æT 
  19718. æD     receiverIDisPSN = 0x00008000,
  19719. æC 
  19720.  
  19721. æKY receiverIDisSignature
  19722. æFc EPPC.h
  19723. æT 
  19724. æD     receiverIDisSignature = 0x00007000,
  19725. æC 
  19726.  
  19727. æKY receiverIDisSessionID
  19728. æFc EPPC.h
  19729. æT 
  19730. æD     receiverIDisSessionID = 0x00006000,
  19731. æC 
  19732.  
  19733. æKY receiverIDisTargetID
  19734. æFc EPPC.h
  19735. æT 
  19736. æD     receiverIDisTargetID = 0x00005000,
  19737. æC 
  19738.  
  19739. æKY systemOptionsMask
  19740. æFc EPPC.h
  19741. æT 
  19742. æD     systemOptionsMask = 0x00000F00,
  19743. æC 
  19744.  
  19745. æKY nReturnReceipt
  19746. æFc EPPC.h
  19747. æT 
  19748. æD     nReturnReceipt = 0x00000200,
  19749. æC 
  19750.  
  19751. æKY priorityMask
  19752. æFc EPPC.h
  19753. æT 
  19754. æD     priorityMask = 0x000000FF,
  19755. æC 
  19756.  
  19757. æKY nAttnMsg
  19758. æFc EPPC.h
  19759. æT 
  19760. æD     nAttnMsg = 0x00000001,
  19761. æC 
  19762.  
  19763. æKY bufferIsSmall
  19764. æFc EPPC.h
  19765. æT 
  19766. æD     bufferIsSmall = -607,
  19767. æC 
  19768.  
  19769. æKY noOutstandingHLE
  19770. æFc EPPC.h
  19771. æT 
  19772. æD     noOutstandingHLE = -608,
  19773. æC 
  19774.  
  19775. æKY connectionInvalid
  19776. æFc EPPC.h
  19777. æT 
  19778. æD     connectionInvalid = -609,
  19779. æC 
  19780.  
  19781. æKY noUserInteractionAllowed
  19782. æFc EPPC.h
  19783. æT 
  19784. æD     noUserInteractionAllowed = -610, /* no user interaction allowed */
  19785. æC 
  19786.  
  19787. æKY HighLevelEventMsgClass
  19788. æFc EPPC.h
  19789. æT #define
  19790. æD #define HighLevelEventMsgClass 'jaym'
  19791. æC 
  19792.  
  19793. æKY rtrnReceiptMsgID
  19794. æFc EPPC.h
  19795. æT #define
  19796. æD #define rtrnReceiptMsgID 'rtrn'
  19797. æC 
  19798.  
  19799. æKY msgWasPartiallyAccepted
  19800. æFc EPPC.h
  19801. æT 
  19802. æD     msgWasPartiallyAccepted = 2,
  19803. æC 
  19804.  
  19805. æKY msgWasFullyAccepted
  19806. æFc EPPC.h
  19807. æT 
  19808. æD     msgWasFullyAccepted = 1,
  19809. æC 
  19810.  
  19811. æKY msgWasNotAccepted
  19812. æFc EPPC.h
  19813. æT 
  19814. æD     msgWasNotAccepted = 0,
  19815. æC 
  19816.  
  19817. æKY TargetID
  19818. TargetIDPtr
  19819. TargetIDHdl
  19820. æFc EPPC.h
  19821. æT struct
  19822. æD struct TargetID {
  19823.     long sessionID;
  19824.     PPCPortRec name;
  19825.     LocationNameRec location;
  19826.     PPCPortRec recvrName;
  19827. };
  19828.  
  19829. typedef struct TargetID TargetID;
  19830. typedef TargetID *TargetIDPtr, **TargetIDHdl;
  19831. æC 
  19832.  
  19833. æKY SenderID
  19834. æFc EPPC.h
  19835. æT typedef
  19836. æD typedef TargetID SenderID;
  19837. æC 
  19838.  
  19839. æKY SenderIDPtr
  19840. æFc EPPC.h
  19841. æT typedef
  19842. æD typedef SenderID *SenderIDPtr;
  19843. æC 
  19844.  
  19845. æKY HighLevelEventMsg
  19846. HighLevelEventMsgPtr
  19847. HighLevelEventMsgHdl
  19848. æFc EPPC.h
  19849. æT struct
  19850. æD struct HighLevelEventMsg {
  19851.     unsigned short HighLevelEventMsgHeaderLength;
  19852.     unsigned short version;
  19853.     unsigned long reserved1;
  19854.     EventRecord theMsgEvent;
  19855.     unsigned long userRefcon;
  19856.     unsigned long postingOptions;
  19857.     unsigned long msgLength;
  19858. };
  19859.  
  19860. typedef struct HighLevelEventMsg HighLevelEventMsg;
  19861. typedef HighLevelEventMsg *HighLevelEventMsgPtr, **HighLevelEventMsgHdl;
  19862. æC 
  19863.  
  19864. æKY PostHighLevelEvent
  19865. æFc EPPC.h
  19866. æT Function
  19867. æTN A88F
  19868. æD pascal OSErr PostHighLevelEvent(const EventRecord *theEvent,
  19869.                                 unsigned long receiverID,
  19870.                                 unsigned long msgRefcon,
  19871.                                 Ptr msgBuff,
  19872.                                 unsigned long msgLen,
  19873.                                 unsigned long postingOptions)
  19874.     = {0x3F3C,0x0034,0xA88F}; 
  19875. æDT OSErr myVariable = PostHighLevelEvent((const EventRecord *) theEvent,(
  19876.                                 unsigned) long receiverID,(
  19877.                                 unsigned) long msgRefcon,()
  19878.                                 Ptr msgBuff,(
  19879.                                 unsigned) long msgLen,(
  19880.                                 unsigned) long postingOptions);
  19881. æC 
  19882.  
  19883. æKY AcceptHighLevelEvent
  19884. æFc EPPC.h
  19885. æT Function
  19886. æTN A88F
  19887. æD pascal OSErr AcceptHighLevelEvent(TargetID *sender,
  19888.                                   unsigned long *msgRefcon,
  19889.                                   Ptr msgBuff,
  19890.                                   unsigned long *msgLen)
  19891.     = {0x3F3C,0x0033,0xA88F}; 
  19892. æDT OSErr myVariable = AcceptHighLevelEvent((TargetID *) sender,(
  19893.                                   unsigned long) * msgRefcon,()
  19894.                                   Ptr msgBuff,(
  19895.                                   unsigned long) * msgLen);
  19896. æC 
  19897.  
  19898. æKY GetProcessSerialNumberFromPortName
  19899. æFc EPPC.h
  19900. æT Function
  19901. æTN A88F
  19902. æD pascal OSErr GetProcessSerialNumberFromPortName(const PPCPortPtr portName,
  19903.     ProcessSerialNumberPtr pPSN)
  19904.     = {0x3F3C,0x0035,0xA88F}; 
  19905. æDT OSErr myVariable = GetProcessSerialNumberFromPortName((const PPCPortPtr) portName,()
  19906.     ProcessSerialNumberPtr pPSN);
  19907. æC 
  19908.  
  19909. æKY GetPortNameFromProcessSerialNumber
  19910. æFc EPPC.h
  19911. æT Function
  19912. æTN A88F
  19913. æD pascal OSErr GetPortNameFromProcessSerialNumber(PPCPortPtr portName,const ProcessSerialNumberPtr pPSN)
  19914.     = {0x3F3C,0x0046,0xA88F}; 
  19915. æDT OSErr myVariable = GetPortNameFromProcessSerialNumber((PPCPortPtr) portName,(const ProcessSerialNumberPtr) pPSN);
  19916. æC 
  19917.  
  19918. æKY GetSpecificFilterProcPtr
  19919. æFc EPPC.h
  19920. æT typedef
  19921. æD typedef pascal Boolean (*GetSpecificFilterProcPtr) (void *yourDataPtr,
  19922.      HighLevelEventMsgPtr msgBuff,
  19923.      const TargetID *sender);
  19924. æC 
  19925.  
  19926. æKY GetSpecificHighLevelEvent
  19927. æFc EPPC.h
  19928. æT Function
  19929. æTN A88F
  19930. æD pascal Boolean GetSpecificHighLevelEvent(GetSpecificFilterProcPtr aFilter,
  19931.     void *yourDataPtr,OSErr *err)
  19932.     = {0x3F3C,0x0045,0xA88F}; 
  19933. æDT Boolean myVariable = GetSpecificHighLevelEvent((GetSpecificFilterProcPtr) aFilter,(
  19934.     void) * yourDataPtr,(OSErr *) err);
  19935. æC 
  19936.  
  19937.  
  19938. æKY ErrMgr.h
  19939. æKL AddErrInsert
  19940. addInserts
  19941. CloseErrMgr
  19942. GetSysErrText
  19943. GetToolErrText
  19944. InitErrMgr
  19945.  
  19946.  
  19947. æKY AddErrInsert
  19948. æFc ErrMgr.h
  19949. æT Function
  19950. æD void AddErrInsert(unsigned char *insert,unsigned char *msgString);
  19951. æDT AddErrInsert((unsigned char *)insert,(unsigned char *)msgString);
  19952. æC 
  19953. /* 
  19954.     Add another insert to an error message string.This call is used when more
  19955.     than one insert is to be added to a message (because it contains more than
  19956.     one '^' character).
  19957. */
  19958.  
  19959. æKY addInserts
  19960. æFc ErrMgr.h
  19961. æT Function
  19962. æD unsigned char *addInserts(unsigned char *msgString,unsigned char *insert,
  19963.     ...);
  19964. æDT unsigned char myVariable = addInserts((unsigned char *)msgString,(unsigned char *)insert,
  19965.     (...));
  19966. æC 
  19967. /* 
  19968.     Add a set of inserts to an error message string.  AddErrInsert is called for
  19969.     each insert parameter specified.
  19970. */
  19971.  
  19972. æKY CloseErrMgr
  19973. æFc ErrMgr.h
  19974. æT Function
  19975. æD void CloseErrMgr(void);
  19976. æDT CloseErrMgr();
  19977. æC 
  19978. /* 
  19979.     Ideally a CloseErrMgr should be done at the end of execution to make sure all
  19980.     files opened by the ErrMgr are closed.  You can let normal program termination
  19981.     do the closing.  But if you are a purist...
  19982. */
  19983.  
  19984. æKY GetSysErrText
  19985. æFc ErrMgr.h
  19986. æT Function
  19987. æD char *GetSysErrText(short msgNbr,char *errMsg);
  19988. æDT char myVariable = GetSysErrText((short)msgNbr,(char *)errMsg);
  19989. æC 
  19990. /* 
  19991.     Get the error message text corresponding to system error number errNbr from
  19992.     the system error message file (whose name was specified in the InitErrMgr
  19993.     call).  The text of the message is returned in errMsg and the function returns
  19994.     a pointer to errMsg.  The maximum length of the message is limited to 254
  19995.     characters.
  19996.     
  19997.     Note, if a system message filename was not specified to InitErrMgr, then the
  19998.     ErrMgr assumes the message file contained in the file "SysErrs.Err".  This
  19999.     file is first accessed as "{ShellDirectory}SysErrs.Err" on the assumption that
  20000.     SysErrs.Err is kept in the same directory as the MPW Shell.  If the file
  20001.     cannot be opened, then an open is attempted on "SysErrs.Err" in the System
  20002.     Folder.
  20003. */
  20004.  
  20005.  
  20006. æKY GetToolErrText
  20007. æFc ErrMgr.h
  20008. æT Function
  20009. æD char *GetToolErrText(short msgNbr,char *errInsert,char *errMsg);
  20010. æDT char myVariable = GetToolErrText((short)msgNbr,(char *)errInsert,(char *)errMsg);
  20011. æC 
  20012. /* 
  20013.     Get the error message text corresponding to tool error number errNbr from
  20014.     the tool error message file (whose name was specified in the InitErrMgr
  20015.     call).  The text of the message is returned in errMsg and the function returns
  20016.     a pointer to errMsg.  The maximum length of the message is limited to 254
  20017.     characters.  If the message is to have an insert, then ErrInsert should be a
  20018.     pointer to it.  Otherwise it should be either be a null string or a NULL
  20019.     pointer.
  20020.     
  20021.     Inserts are indicated in error messages by specifying a '^' to indicate where
  20022.     the insert is to be placed.
  20023.     
  20024.     Note, if a tool message filename was not specified to InitErrMgr, then the
  20025.     ErrMgr assumes the message file contained in the data fork of the tool calling
  20026.     the ErrMgr.  This name is contained in the Shell variable {Command} and the
  20027.     value of that variable is used to open the error message file.
  20028. */
  20029.  
  20030. æKY InitErrMgr
  20031. æFc ErrMgr.h
  20032. æT Function
  20033. æD void InitErrMgr(char *toolErrFilename,char *sysErrFilename,Boolean showToolErrNbrs);
  20034. æDT InitErrMgr((char *)toolErrFilename,(char *)sysErrFilename,
  20035.     (Boolean)showToolErrNbrs);
  20036. æC 
  20037. /* 
  20038.     ErrMgr initialization.This must be done before using any other ErrMgr
  20039.     routine.  Set showToolErrNbrs to true if you want all tool messages to contain
  20040.     the error number following the message text enclosed in parentheses (e.g.,
  20041.     "<msg txt> ([OS] Error <n>)"; system error messages always contain the error 
  20042.     number).  The toolErrFileName parameter is used to specify the name of a 
  20043.     tool-specific error file, and should be the NULL or a null string if not used
  20044.     (or if the tool's data fork is to be used as the error file, see
  20045.     GetToolErrText for futher details). The sysErrFileName parameter is used to
  20046.     specify the name of a system error file, and should normally be the NULL or a
  20047.     null string, which causes the ErrMgr to look in the MPW Shell directory for
  20048.     "SysErrs.Err" (see GetSysErrText).
  20049.     
  20050.     If InitErrMgr is NOT called prior to calling GetSysErrText or GetToolErrText,
  20051.     then those routines, the first time they are called, will call InitErrMgr as
  20052.     InitErrMgr(NULL, NULL, true).
  20053.     
  20054.     The following global may be set to true to allow a C caller to process all
  20055.     strings as Pascal strings:*/
  20056.     
  20057.     extern Boolean pascalStrings;   /* set to true for Pascal strings*//*
  20058.     
  20059.     This should be set PRIOR to calling InitErrMgr.  Once set, ALL strings, both
  20060.     those passed to the ErrMgr as filenames and error message inserts, as well as
  20061.     the messages returned by the ErrMgr will be Pascal strings.  There is NO
  20062.     guarantee a '\0' byte is at the end of the string.  Results are unpredictable
  20063.     if pascalStringsis set false after it has been set true!
  20064.     
  20065. */
  20066.  
  20067.  
  20068. æKY ErrNo.h
  20069. æFc ErrNo.h
  20070. æC Synopsis
  20071.  
  20072. #include <ErrNo.h>
  20073. extern int errno;
  20074. extern short MacOSErr;
  20075.  
  20076.                            Description
  20077.  
  20078. Many of the Standard C Library functions can return, in 
  20079. addition to their normal return values, a negative value 
  20080. indicating an error, typically –1. For example, a function 
  20081. returning a character as an int will indicate an error by 
  20082. returning –1, which is not a legitimate ASCII value. (See the 
  20083. Descriptions of individual functions for details.) The external 
  20084. variable errno also provides an error number. Variable errno is 
  20085. not cleared on successful calls, so it should be tested only if 
  20086. the return value indicates an error.
  20087.  
  20088. The error name appears in brackets following the text in a 
  20089. library function description: for example,
  20090. “The next attempt to write a nonzero number of bytes will 
  20091. signal an error. [ENOSPC]”
  20092.  
  20093. Not all possible error numbers are listed for each library 
  20094. function because many errors are possible for most of the 
  20095. calls. Some UNIX operating system error numbers do not apply 
  20096. to Macintosh and are not documented in this manual. Some calls 
  20097. go to the Macintosh ROM and return a value in MacOSErr as well 
  20098. as the value in errno.
  20099.  
  20100. Table 3-2 is a list of the error numbers and their names as 
  20101. defined in the <ErrNo.h> file. Not all the error numbers listed 
  20102. here will be returned, but they are included in the header file 
  20103. for compatibility.
  20104.  
  20105. Table 3-2    I/O errors
  20106. Value    Identifier  Message Explanation
  20107.  
  20108.   1      EPERM       No permission match An attempt was made to 
  20109.                      modify a file in some way forbidden except to its 
  20110.                      creator.
  20111.   2      ENOENT      No such file or directory   A file whose filename is 
  20112.                      specified does not exist, or one of the directories 
  20113.                      in a pathname does not exist.
  20114.   3      ENORSRC     Resource not found  A required resource was not found.
  20115.                      This error applies to faccess calls that return tab, 
  20116.                      font, or print record information.
  20117.   4      EINTR       System service interrupted  A requested system 
  20118.                      call cannot be completed. 
  20119.                      This error may occur if a request to rename a file 
  20120.                      is unsuccessful.
  20121.   5      EIO         I/O error   Some physical I/O error has occurred. 
  20122.                      This error may in some cases be signaled on a call 
  20123.                      following the one to which it actually applies.
  20124.   6      ENXIO       No such device or address   I/O on a special file 
  20125.                      refers to a subdevice that does not exist, or the I/O 
  20126.                      is beyond the limits of the device. This error 
  20127.                      may also occur when, for example, no disk is 
  20128.                      present in a drive.
  20129.   7      E2BIG       Insufficient space for  The data to be returned 
  20130.                      is too large for the space allocated to receive it.
  20131.   9      EBADF       Bad file number Either a file descriptor 
  20132.                      does not refer to an open file, or a read (or write) 
  20133.                      request is made to a file that is open only for 
  20134.                      writing (or reading).
  20135.  12      ENOMEM      Not enough space. The system ran out of 
  20136.                      memory while the library call was executing.
  20137.  13      EACCES      Permission denied. An attempt was made to access 
  20138.                      a file in a way forbidden by the protection system.
  20139.  14      EFAULT      Illegal filename. A filename or volume name was too 
  20140.                      long or otherwise illegal.
  20141.  15      ENOTBLK     Block device required. A non-block file was 
  20142.                      used when a block device was required.
  20143.  16      EBUSY       Device or resource busy. An attempt was made to 
  20144.                      mount a volume that was already mounted, or to 
  20145.                      delete a locked file.
  20146.  17      EEXIST      File exists. An existing file was mentioned in an 
  20147.                      inappropriate context; for example, open(file, 
  20148.                      O_CREAT+O_EXCL).
  20149.  18      EXDEV       Cross-device link. A link to a file on another 
  20150.                      device was attempted.
  20151.  19      ENODEV      No such device. An attempt was made to apply an 
  20152.                      inappropriate system call to a device; 
  20153.                      for example, read a write-only device.
  20154.  20      ENOTDIR     Not a directory. An object that is not a directory
  20155.                      was specified where a directory is required; 
  20156.                      for example, in a path prefix.
  20157.  21      EISDIR      Is a directory. An attempt was made to 
  20158.                      write on a directory.
  20159.  22      EINVAL      Invalid parameter. Some invalid parameter 
  20160.                      was provided to a library function.
  20161.  23      ENFILE      File table overflow. The system’s table of open
  20162.                      files is full, so temporarily a call to open 
  20163.                      cannot be accepted.
  20164.  24      EMFILE      Too many open files. The system cannot allocate
  20165.                      memory to record another open file.
  20166.  25      ENOTTY      Not a typewriter. The specified file isn’t a 
  20167.                      character file.
  20168.  26      ETXTBSY     Text file busy. An attempt was made to open
  20169.                      a file that was already open for writing.
  20170.  27      EFBIG       File too large. The size of a file was 
  20171.                      larger than the maximum file size.
  20172.  28      ENOSPC      No space left on device. During a write to a file, 
  20173.                      there is no free space left on the device.
  20174.  29      ESPIPE      Illegal seek. An lseek was issued incorrectly.
  20175.  30      EROFS       Read-only file system. An attempt to modify a 
  20176.                      file or directory was made on a device 
  20177.                      mounted for read-only access.
  20178.  31      EMLINK      Too many links. An attempt to delete an 
  20179.                      open file was made.
  20180.  33      EDOM        Math arg out of domain of func. The argument of a 
  20181.                      math function is outside the domain of the 
  20182.                      function.
  20183.  34      ERANGE      Math result not representable. The value of a math 
  20184.                      function can’t be represented within the 
  20185.                      machine’s precision.
  20186.  
  20187.                            Note
  20188.  
  20189. Calls that interface to the Macintosh I/O system (such as open, 
  20190. close, read, write, and ioctl) can set the external variable 
  20191. MacOSErr as well as errno on errors. This section documents the 
  20192. errno values. The equivalent Macintosh ROM error-return 
  20193. values set in MacOSErr are documented in the System Error 
  20194. Handler chapter of Inside Macintosh.
  20195.  
  20196. See also
  20197. hypot, signal, perror, creat, open, close, read, write, ioctl
  20198.  
  20199.  
  20200. æKY Errors.h
  20201. æKL SysError
  20202.  
  20203. abortErr
  20204. addRefFailed
  20205. addResFailed
  20206. afpAccessDenied
  20207. afpAuthContinue
  20208. afpBadIDErr
  20209. afpBadUAM
  20210. afpBadVersNum
  20211. afpBitmapErr
  20212. afpCallNotSupported
  20213. afpCantMove
  20214. afpCantRename
  20215. afpCatalogChanged
  20216. afpContainsSharedErr
  20217. afpDenyConflict
  20218. afpDiffVolErr
  20219. afpDirNotEmpty
  20220. afpDirNotFound
  20221. afpDiskFull
  20222. afpEofError
  20223. afpFileBusy
  20224. afpFlatVol
  20225. afpIconTypeError
  20226. afpIDExists
  20227. afpIDNotFound
  20228. afpInsideSharedErr
  20229. afpInsideTrashErr
  20230. afpItemNotFound
  20231. afpLockErr
  20232. afpMiscErr
  20233. afpNoMoreLocks
  20234. afpNoServer
  20235. afpObjectExists
  20236. afpObjectLocked
  20237. afpObjectNotFound
  20238. afpObjectTypeErr
  20239. afpParmErr
  20240. afpPwdExpiredErr
  20241. afpPwdSameErr
  20242. afpPwdTooShortErr
  20243. afpRangeNotLocked
  20244. afpRangeOverlap
  20245. afpSameObjectErr
  20246. afpServerGoingDown
  20247. afpSessClosed
  20248. afpTooManyFilesOpen
  20249. afpUserNotAuth
  20250. afpVolLocked
  20251. appIsDaemon
  20252. appMemFullErr
  20253. appModeErr
  20254. aspBadVersNum
  20255. aspBufTooSmall
  20256. aspNoAck
  20257. aspNoMoreSess
  20258. aspNoServers
  20259. aspParamErr
  20260. aspServerBusy
  20261. aspSessClosed
  20262. aspSizeErr
  20263. aspTooMany
  20264. atpBadRsp
  20265. atpLenErr
  20266. authFailErr
  20267. badATPSkt
  20268. badBtSlpErr
  20269. badBuffNum
  20270. badChannel
  20271. badCksmErr
  20272. badDBtSlp
  20273. badDCksum
  20274. badEditionFileErr
  20275. badExtResource
  20276. badFidErr
  20277. badFileFormat
  20278. badFormat
  20279. badLocNameErr
  20280. badMDBErr
  20281. badMovErr
  20282. badPortNameErr
  20283. badReqErr
  20284. badSectionErr
  20285. badServiceMethodErr
  20286. badSubPartErr
  20287. badUnitErr
  20288. bdNamErr
  20289. breakRecd
  20290. buf2SmallErr
  20291. buffersTooSmall
  20292. cannotDeferErr
  20293. cannotMakeContiguousErr
  20294. CantDecompress
  20295. cantLoadPickMethodErr
  20296. cantStepErr
  20297. catChangedErr
  20298. cbNotFound
  20299. CDEFNFnd
  20300. cDevErr
  20301. channelBusy
  20302. channelNotBusy
  20303. ckSumErr
  20304. clkRdErr
  20305. clkWrErr
  20306. closErr
  20307. cMatchErr
  20308. cNoMemErr
  20309. colorsRequestedErr
  20310. containerAlreadyOpenWrn
  20311. containerNotFoundWrn
  20312. controlErr
  20313. corErr
  20314. cProtectErr
  20315. cRangeErr
  20316. cResErr
  20317. cTempMemErr
  20318. dataVerErr
  20319. dceExtErr
  20320. ddpLenErr
  20321. ddpSktErr
  20322. desktopDamagedErr
  20323. destPortErr
  20324. diffVolErr
  20325. dInstErr
  20326. dirFulErr
  20327. dirNFErr
  20328. dRemovErr
  20329. ds32BitMode
  20330. dsAddressErr
  20331. dsBadLaunch
  20332. dsBadPatch
  20333. dsBadPatchHeader
  20334. dsBadSANEOpcode
  20335. dsBadSlotInt
  20336. dsBadStartupDisk
  20337. dsBufPtrTooLow
  20338. dsBusError
  20339. dsCDEFNotFound
  20340. dsChkErr
  20341. dsCoreErr
  20342. dsDisassemblerInstalled
  20343. dsExtensionsDisabled
  20344. dsFinderErr
  20345. dsForcedQuit
  20346. dsFPErr
  20347. dsFSErr
  20348. dsGreeting
  20349. dsHD20Installed
  20350. dsHMenuFindErr
  20351. dsIllInstErr
  20352. dsIOCoreErr
  20353. dsIrqErr
  20354. dskFulErr
  20355. dsLineAErr
  20356. dsLineFErr
  20357. dsLoadErr
  20358. dsMacsBugInstalled
  20359. dsMBarNFnd
  20360. dsMDEFNotFound
  20361. dsMemFullErr
  20362. dsMiscErr
  20363. dsNeedToWriteBootBlocks
  20364. dsNoFPU
  20365. dsNoPackErr
  20366. dsNoPatch
  20367. dsNoPk1
  20368. dsNoPk2
  20369. dsNoPk3
  20370. dsNoPk4
  20371. dsNoPk5
  20372. dsNoPk6
  20373. dsNoPk7
  20374. dsNotEnoughRAMToBoot
  20375. dsNotThe1
  20376. dsOldSystem
  20377. dsOvflowErr
  20378. dsParityErr
  20379. dsPrivErr
  20380. dsReinsert
  20381. dsShutDownOrRestart
  20382. dsStknHeap
  20383. dsSwitchOffOrRestart
  20384. dsSysErr
  20385. dsSystemFileErr
  20386. dsTraceErr
  20387. dsWDEFNotFound
  20388. dsZeroDivErr
  20389. dupFNErr
  20390. editionMgrInitErr
  20391. envBadVers
  20392. envNotPresent
  20393. envVersTooBig
  20394. eofErr
  20395. evtNotEnb
  20396. excessCollsns
  20397. extFSErr
  20398. extractErr
  20399. exUserBreak
  20400. fBsyErr
  20401. fidExists
  20402. fidNotFound
  20403. firstDskErr
  20404. fLckdErr
  20405. fmt1Err
  20406. fmt2Err
  20407. fnfErr
  20408. fnOpnErr
  20409. fontDecError
  20410. fontNotDeclared
  20411. fontNotOutlineErr
  20412. fontSubErr
  20413. framingErr
  20414. fsRnErr
  20415. gcrOnMFMErr
  20416. gfpErr
  20417. guestNotAllowedErr
  20418. hardwareConfigErr
  20419. hMenuFindErr
  20420. hwOverrunErr
  20421. hwParamErr
  20422. iIOAbortErr
  20423. initIWMErr
  20424. interruptsMaskedErr
  20425. ioErr
  20426. lapProtErr
  20427. lastDskErr
  20428. localOnlyErr
  20429. MacOSErr
  20430. mapReadErr
  20431. mBarNFnd
  20432. memAdrErr
  20433. memAZErr
  20434. memBCErr
  20435. memFragErr
  20436. memFullErr
  20437. memLockedErr
  20438. memPCErr
  20439. memPurErr
  20440. memROZErr
  20441. memROZError
  20442. memROZWarn
  20443. memSCErr
  20444. memWZErr
  20445. menuPrgErr
  20446. mFulErr
  20447. multiplePublisherWrn
  20448. nameTypeErr
  20449. nbpBuffOvr
  20450. nbpConfDiff
  20451. nbpDuplicate
  20452. nbpNISErr
  20453. nbpNoConfirm
  20454. nbpNotFound
  20455. negZcbFreeErr
  20456. networkErr
  20457. nilHandleErr
  20458. nmTypErr
  20459. noAdrMkErr
  20460. noBridgeErr
  20461. noDataArea
  20462. noDefaultUserErr
  20463. noDriveErr
  20464. noDtaMkErr
  20465. noGlobalsErr
  20466. noHardware
  20467. noHardwareErr
  20468. noInformErr
  20469. noMacDskErr
  20470. noMachineNameErr
  20471. noMemForPictPlaybackErr
  20472. noMoreRealTime
  20473. noMPPErr
  20474. noNybErr
  20475. noPortErr
  20476. noRelErr
  20477. noResponseErr
  20478. noScrapErr
  20479. noSendResp
  20480. noSessionErr
  20481. notAFileErr
  20482. notEnoughBufferSpace
  20483. notEnoughHardware
  20484. notEnoughHardwareErr
  20485. notEnoughMemoryErr
  20486. notHeldErr
  20487. notInitErr
  20488. notLockedErr
  20489. notLoggedInErr
  20490. noToolboxNameErr
  20491. notOpenErr
  20492. notRegisteredSectionErr
  20493. notThePublisherWrn
  20494. noTypeErr
  20495. noUserNameErr
  20496. noUserRecErr
  20497. noUserRefErr
  20498. nsDrvErr
  20499. nsStackErr
  20500. nsvErr
  20501. offLinErr
  20502. openErr
  20503. opWrErr
  20504. paramErr
  20505. parityErr
  20506. permErr
  20507. pictInfoIDErr
  20508. pictInfoVerbErr
  20509. pictInfoVersionErr
  20510. pictureDataErr
  20511. pixMapTooDeepErr
  20512. pmBusyErr
  20513. pmRecvEndErr
  20514. pmRecvStartErr
  20515. pmReplyTOErr
  20516. pmSendEndErr
  20517. pmSendStartErr
  20518. portClosedErr
  20519. portInUse
  20520. portNameExistsErr
  20521. portNotCf
  20522. posErr
  20523. prInitErr
  20524. procNotFound
  20525. protocolErr
  20526. prWrErr
  20527. qErr
  20528. queueFull
  20529. rcvrErr
  20530. readErr
  20531. readQErr
  20532. recNotFnd
  20533. reqAborted
  20534. reqFailed
  20535. resAttrErr
  20536. resFNotFound
  20537. resNotFound
  20538. resProblem
  20539. rfNumErr
  20540. rgnTooBigErr
  20541. rgnTooBigError
  20542. rmvRefFailed
  20543. rmvResFailed
  20544. sameFileErr
  20545. sdmInitErr
  20546. sdmJTInitErr
  20547. sdmPRAMInitErr
  20548. sdmPriInitErr
  20549. sdmSRTInitErr
  20550. sectNFErr
  20551. seekErr
  20552. selectorErr
  20553. seNoDB
  20554. sessClosedErr
  20555. sessTableErr
  20556. shutDownAlert
  20557. siBadDeviceName
  20558. siBadRefNum
  20559. siBadSoundInDevice
  20560. siDeviceBusyErr
  20561. siHardDriveTooSlow
  20562. siInitSDTblErr
  20563. siInitSPTblErr
  20564. siInitVBLQsErr
  20565. siInputDeviceErr
  20566. siInvalidCompression
  20567. siInvalidSampleRate
  20568. siInvalidSampleSize
  20569. siNoBufferSpecified
  20570. siNoSoundInHardware
  20571. siUnknownInfoType
  20572. siUnknownQuality
  20573. sktClosedErr
  20574. slotNumErr
  20575. SlpTypeErr
  20576. smBadBoardId
  20577. smBadRefId
  20578. smBadsList
  20579. smBadsPtrErr
  20580. smBLFieldBad
  20581. smBlkMoveErr
  20582. smBusErrTO
  20583. smByteLanesErr
  20584. smCkStatusErr
  20585. smCodeRevErr
  20586. smCPUErr
  20587. smCRCFail
  20588. smDisabledSlot
  20589. smDisDrvrNamErr
  20590. smDisposePErr
  20591. smEmptySlot
  20592. smFHBlkDispErr
  20593. smFHBlockRdErr
  20594. smFormatErr
  20595. smGetDrvrNamErr
  20596. smGetPRErr
  20597. smInitStatVErr
  20598. smInitTblVErr
  20599. smNewPErr
  20600. smNilsBlockErr
  20601. smNoBoardId
  20602. smNoBoardSRsrc
  20603. smNoDir
  20604. smNoGoodOpens
  20605. smNoJmpTbl
  20606. smNoMoresRsrcs
  20607. smNosInfoArray
  20608. smOffsetErr
  20609. smPRAMInitErr
  20610. smPriInitErr
  20611. smRecNotFnd
  20612. smReservedErr
  20613. smResrvErr
  20614. smRevisionErr
  20615. smSDMInitErr
  20616. smSelOOBErr
  20617. smsGetDrvrErr
  20618. smSlotOOBErr
  20619. smsPointerNil
  20620. smSRTInitErr
  20621. smSRTOvrFlErr
  20622. smUnExBusErr
  20623. spdAdjErr
  20624. statusErr
  20625. strUserBreak
  20626. svDisabled
  20627. svTempDisable
  20628. swOverrunErr
  20629. teScrapSizeErr
  20630. tk0BadErr
  20631. tmfoErr
  20632. tmwdoErr
  20633. tooManyReqs
  20634. tooManySkts
  20635. twoSideErr
  20636. unimpErr
  20637. unitEmptyErr
  20638. unitTblFullErr
  20639. updPixMemErr
  20640. userBreak
  20641. userCanceledErr
  20642. userRejectErr
  20643. verErr
  20644. vLckdErr
  20645. volGoneErr
  20646. volOffLinErr
  20647. volOnLinErr
  20648. vTypErr
  20649. WDEFNFnd
  20650. wPrErr
  20651. wrgVolTypErr
  20652. writErr
  20653. wrPermErr
  20654. wrUnderrun
  20655.  
  20656. æKY paramErr
  20657. æFc Errors.h
  20658. æT 
  20659. æD     paramErr = -50, /*error in user parameter list*/
  20660. æC 
  20661.  
  20662. æKY noHardwareErr
  20663. æFc Errors.h
  20664. æT 
  20665. æD     noHardwareErr = -200, /*Sound Manager Error Returns*/
  20666. æC 
  20667.  
  20668. æKY notEnoughHardwareErr
  20669. æFc Errors.h
  20670. æT 
  20671. æD     notEnoughHardwareErr = -201, /*Sound Manager Error Returns*/
  20672. æC 
  20673.  
  20674. æKY userCanceledErr
  20675. æFc Errors.h
  20676. æT 
  20677. æD     userCanceledErr = -128,
  20678. æC 
  20679.  
  20680. æKY qErr
  20681. æFc Errors.h
  20682. æT 
  20683. æD     qErr = -1, /*queue element not found during deletion*/
  20684. æC 
  20685.  
  20686. æKY vTypErr
  20687. æFc Errors.h
  20688. æT 
  20689. æD     vTypErr = -2, /*invalid queue element*/
  20690. æC 
  20691.  
  20692. æKY corErr
  20693. æFc Errors.h
  20694. æT 
  20695. æD     corErr = -3, /*core routine number out of range*/
  20696. æC 
  20697.  
  20698. æKY unimpErr
  20699. æFc Errors.h
  20700. æT 
  20701. æD     unimpErr = -4, /*unimplemented core routine*/
  20702. æC 
  20703.  
  20704. æKY SlpTypeErr
  20705. æFc Errors.h
  20706. æT 
  20707. æD     SlpTypeErr = -5, /*invalid queue element*/
  20708. æC 
  20709.  
  20710. æKY seNoDB
  20711. æFc Errors.h
  20712. æT 
  20713. æD     seNoDB = -8, /*no debugger installed to handle debugger command*/
  20714. æC 
  20715.  
  20716. æKY controlErr
  20717. æFc Errors.h
  20718. æT 
  20719. æD     controlErr = -17, /*I/O System Errors*/
  20720. æC 
  20721.  
  20722. æKY statusErr
  20723. æFc Errors.h
  20724. æT 
  20725. æD     statusErr = -18, /*I/O System Errors*/
  20726. æC 
  20727.  
  20728. æKY readErr
  20729. æFc Errors.h
  20730. æT 
  20731. æD     readErr = -19, /*I/O System Errors*/
  20732. æC 
  20733.  
  20734. æKY writErr
  20735. æFc Errors.h
  20736. æT 
  20737. æD     writErr = -20, /*I/O System Errors*/
  20738. æC 
  20739.  
  20740. æKY badUnitErr
  20741. æFc Errors.h
  20742. æT 
  20743. æD     badUnitErr = -21, /*I/O System Errors*/
  20744. æC 
  20745.  
  20746. æKY unitEmptyErr
  20747. æFc Errors.h
  20748. æT 
  20749. æD     unitEmptyErr = -22, /*I/O System Errors*/
  20750. æC 
  20751.  
  20752. æKY openErr
  20753. æFc Errors.h
  20754. æT 
  20755. æD     openErr = -23, /*I/O System Errors*/
  20756. æC 
  20757.  
  20758. æKY closErr
  20759. æFc Errors.h
  20760. æT 
  20761. æD     closErr = -24, /*I/O System Errors*/
  20762. æC 
  20763.  
  20764. æKY dRemovErr
  20765. æFc Errors.h
  20766. æT 
  20767. æD     dRemovErr = -25, /*tried to remove an open driver*/
  20768. æC 
  20769.  
  20770. æKY dInstErr
  20771. æFc Errors.h
  20772. æT 
  20773. æD     dInstErr = -26, /*DrvrInstall couldn't find driver in resources */
  20774. æC 
  20775.  
  20776. æKY abortErr
  20777. æFc Errors.h
  20778. æT 
  20779. æD     abortErr = -27, /*IO call aborted by KillIO*/
  20780. æC 
  20781.  
  20782. æKY iIOAbortErr
  20783. æFc Errors.h
  20784. æT 
  20785. æD     iIOAbortErr = -27, /*IO abort error (Printing Manager)*/
  20786. æC 
  20787.  
  20788. æKY notOpenErr
  20789. æFc Errors.h
  20790. æT 
  20791. æD     notOpenErr = -28, /*Couldn't rd/wr/ctl/sts cause driver not opened*/
  20792. æC 
  20793.  
  20794. æKY unitTblFullErr
  20795. æFc Errors.h
  20796. æT 
  20797. æD     unitTblFullErr = -29, /*unit table has no more entries*/
  20798. æC 
  20799.  
  20800. æKY dceExtErr
  20801. æFc Errors.h
  20802. æT 
  20803. æD     dceExtErr = -30, /*dce extension error*/
  20804. æC 
  20805.  
  20806. æKY slotNumErr
  20807. æFc Errors.h
  20808. æT 
  20809. æD     slotNumErr = -360, /*invalid slot # error*/
  20810. æC 
  20811.  
  20812. æKY gcrOnMFMErr
  20813. æFc Errors.h
  20814. æT 
  20815. æD     gcrOnMFMErr = -400, /*gcr format on high density media error*/
  20816. æC 
  20817.  
  20818. æKY dirFulErr
  20819. æFc Errors.h
  20820. æT 
  20821. æD     dirFulErr = -33, /*Directory full*/
  20822. æC 
  20823.  
  20824. æKY dskFulErr
  20825. æFc Errors.h
  20826. æT 
  20827. æD     dskFulErr = -34, /*disk full*/
  20828. æC 
  20829.  
  20830. æKY nsvErr
  20831. æFc Errors.h
  20832. æT 
  20833. æD     nsvErr = -35, /*no such volume*/
  20834. æC 
  20835.  
  20836. æKY ioErr
  20837. æFc Errors.h
  20838. æT 
  20839. æD     ioErr = -36, /*I/O error (bummers)*/
  20840. æC 
  20841.  
  20842. æKY bdNamErr
  20843. æFc Errors.h
  20844. æT 
  20845. æD     bdNamErr = -37, /*there may be no bad names in the final system!*/
  20846. æC 
  20847.  
  20848. æKY fnOpnErr
  20849. æFc Errors.h
  20850. æT 
  20851. æD     fnOpnErr = -38, /*File not open*/
  20852. æC 
  20853.  
  20854. æKY eofErr
  20855. æFc Errors.h
  20856. æT 
  20857. æD     eofErr = -39, /*End of file*/
  20858. æC 
  20859.  
  20860. æKY posErr
  20861. æFc Errors.h
  20862. æT 
  20863. æD     posErr = -40, /*tried to position to before start of file (r/w)*/
  20864. æC 
  20865.  
  20866. æKY mFulErr
  20867. æFc Errors.h
  20868. æT 
  20869. æD     mFulErr = -41, /*memory full (open) or file won't fit (load)*/
  20870. æC 
  20871.  
  20872. æKY tmfoErr
  20873. æFc Errors.h
  20874. æT 
  20875. æD     tmfoErr = -42, /*too many files open*/
  20876. æC 
  20877.  
  20878. æKY fnfErr
  20879. æFc Errors.h
  20880. æT 
  20881. æD     fnfErr = -43, /*File not found*/
  20882. æC 
  20883.  
  20884. æKY wPrErr
  20885. æFc Errors.h
  20886. æT 
  20887. æD     wPrErr = -44, /*diskette is write protected.*/
  20888. æC 
  20889.  
  20890. æKY fLckdErr
  20891. æFc Errors.h
  20892. æT 
  20893. æD     fLckdErr = -45, /*file is locked*/
  20894. æC 
  20895.  
  20896. æKY vLckdErr
  20897. æFc Errors.h
  20898. æT 
  20899. æD     vLckdErr = -46, /*volume is locked*/
  20900. æC 
  20901.  
  20902. æKY fBsyErr
  20903. æFc Errors.h
  20904. æT 
  20905. æD     fBsyErr = -47, /*File is busy (delete)*/
  20906. æC 
  20907.  
  20908. æKY dupFNErr
  20909. æFc Errors.h
  20910. æT 
  20911. æD     dupFNErr = -48, /*duplicate filename (rename)*/
  20912. æC 
  20913.  
  20914. æKY opWrErr
  20915. æFc Errors.h
  20916. æT 
  20917. æD     opWrErr = -49, /*file already open with with write permission*/
  20918. æC 
  20919.  
  20920. æKY rfNumErr
  20921. æFc Errors.h
  20922. æT 
  20923. æD     rfNumErr = -51, /*refnum error*/
  20924. æC 
  20925.  
  20926. æKY gfpErr
  20927. æFc Errors.h
  20928. æT 
  20929. æD     gfpErr = -52, /*get file position error*/
  20930. æC 
  20931.  
  20932. æKY volOffLinErr
  20933. æFc Errors.h
  20934. æT 
  20935. æD     volOffLinErr = -53, /*volume not on line error (was Ejected)*/
  20936. æC 
  20937.  
  20938. æKY permErr
  20939. æFc Errors.h
  20940. æT 
  20941. æD     permErr = -54, /*permissions error (on file open)*/
  20942. æC 
  20943.  
  20944. æKY volOnLinErr
  20945. æFc Errors.h
  20946. æT 
  20947. æD     volOnLinErr = -55, /*drive volume already on-line at MountVol*/
  20948. æC 
  20949.  
  20950. æKY nsDrvErr
  20951. æFc Errors.h
  20952. æT 
  20953. æD     nsDrvErr = -56, /*no such drive (tried to mount a bad drive num)*/
  20954. æC 
  20955.  
  20956. æKY noMacDskErr
  20957. æFc Errors.h
  20958. æT 
  20959. æD     noMacDskErr = -57, /*not a mac diskette (sig bytes are wrong)*/
  20960. æC 
  20961.  
  20962. æKY extFSErr
  20963. æFc Errors.h
  20964. æT 
  20965. æD     extFSErr = -58, /*volume in question belongs to an external fs*/
  20966. æC 
  20967.  
  20968. æKY fsRnErr
  20969. æFc Errors.h
  20970. æT 
  20971. æD     fsRnErr = -59, /*file system internal error:during rename the old entry was deleted but could not be restored.*/
  20972. æC 
  20973.  
  20974. æKY badMDBErr
  20975. æFc Errors.h
  20976. æT 
  20977. æD     badMDBErr = -60, /*bad master directory block*/
  20978. æC 
  20979.  
  20980. æKY wrPermErr
  20981. æFc Errors.h
  20982. æT 
  20983. æD     wrPermErr = -61, /*write permissions error*/
  20984. æC 
  20985.  
  20986. æKY dirNFErr
  20987. æFc Errors.h
  20988. æT 
  20989. æD     dirNFErr = -120, /*Directory not found*/
  20990. æC 
  20991.  
  20992. æKY tmwdoErr
  20993. æFc Errors.h
  20994. æT 
  20995. æD     tmwdoErr = -121, /*No free WDCB available*/
  20996. æC 
  20997.  
  20998. æKY badMovErr
  20999. æFc Errors.h
  21000. æT 
  21001. æD     badMovErr = -122, /*Move into offspring error*/
  21002. æC 
  21003.  
  21004. æKY wrgVolTypErr
  21005. æFc Errors.h
  21006. æT 
  21007. æD     wrgVolTypErr = -123, /*Wrong volume type error [operation not supported for MFS]*/
  21008. æC 
  21009.  
  21010. æKY volGoneErr
  21011. æFc Errors.h
  21012. æT 
  21013. æD     volGoneErr = -124, /*Server volume has been disconnected.*/
  21014. æC 
  21015.  
  21016. æKY fidNotFound
  21017. æFc Errors.h
  21018. æT 
  21019. æD     fidNotFound = -1300, /*no file thread exists.*/
  21020. æC 
  21021.  
  21022. æKY fidExists
  21023. æFc Errors.h
  21024. æT 
  21025. æD     fidExists = -1301, /*file id already exists*/
  21026. æC 
  21027.  
  21028. æKY notAFileErr
  21029. æFc Errors.h
  21030. æT 
  21031. æD     notAFileErr = -1302, /*directory specified*/
  21032. æC 
  21033.  
  21034. æKY diffVolErr
  21035. æFc Errors.h
  21036. æT 
  21037. æD     diffVolErr = -1303, /*files on different volumes*/
  21038. æC 
  21039.  
  21040. æKY catChangedErr
  21041. æFc Errors.h
  21042. æT 
  21043. æD     catChangedErr = -1304, /*the catalog has been modified*/
  21044. æC 
  21045.  
  21046. æKY desktopDamagedErr
  21047. æFc Errors.h
  21048. æT 
  21049. æD     desktopDamagedErr = -1305, /*desktop database files are corrupted*/
  21050. æC 
  21051.  
  21052. æKY sameFileErr
  21053. æFc Errors.h
  21054. æT 
  21055. æD     sameFileErr = -1306, /*can't exchange a file with itself*/
  21056. æC 
  21057.  
  21058. æKY badFidErr
  21059. æFc Errors.h
  21060. æT 
  21061. æD     badFidErr = -1307, /*file id is dangling or doesn't match with the file number*/
  21062. æC 
  21063.  
  21064. æKY envNotPresent
  21065. æFc Errors.h
  21066. æT 
  21067. æD     envNotPresent = -5500, /*returned by glue.*/
  21068. æC 
  21069.  
  21070. æKY envBadVers
  21071. æFc Errors.h
  21072. æT 
  21073. æD     envBadVers = -5501, /*Version non-positive*/
  21074. æC 
  21075.  
  21076. æKY envVersTooBig
  21077. æFc Errors.h
  21078. æT 
  21079. æD     envVersTooBig = -5502, /*Version bigger than call can handle*/
  21080. æC 
  21081.  
  21082. æKY fontDecError
  21083. æFc Errors.h
  21084. æT 
  21085. æD     fontDecError = -64, /*error during font declaration*/
  21086. æC 
  21087.  
  21088. æKY fontNotDeclared
  21089. æFc Errors.h
  21090. æT 
  21091. æD     fontNotDeclared = -65, /*font not declared*/
  21092. æC 
  21093.  
  21094. æKY fontSubErr
  21095. æFc Errors.h
  21096. æT 
  21097. æD     fontSubErr = -66, /*font substitution occured*/
  21098. æC 
  21099.  
  21100. æKY fontNotOutlineErr
  21101. æFc Errors.h
  21102. æT 
  21103. æD     fontNotOutlineErr = -32615, /*bitmap font passed to routine that does outlines only*/
  21104. æC 
  21105.  
  21106. æKY firstDskErr
  21107. æFc Errors.h
  21108. æT 
  21109. æD     firstDskErr = -84, /*I/O System Errors*/
  21110. æC 
  21111.  
  21112. æKY lastDskErr
  21113. æFc Errors.h
  21114. æT 
  21115. æD     lastDskErr = -64, /*I/O System Errors*/
  21116. æC 
  21117.  
  21118. æKY noDriveErr
  21119. æFc Errors.h
  21120. æT 
  21121. æD     noDriveErr = -64, /*drive not installed*/
  21122. æC 
  21123.  
  21124. æKY offLinErr
  21125. æFc Errors.h
  21126. æT 
  21127. æD     offLinErr = -65, /*r/w requested for an off-line drive*/
  21128. æC 
  21129.  
  21130. æKY noNybErr
  21131. æFc Errors.h
  21132. æT 
  21133. æD     noNybErr = -66, /*couldn't find 5 nybbles in 200 tries*/
  21134. æC 
  21135.  
  21136. æKY noAdrMkErr
  21137. æFc Errors.h
  21138. æT 
  21139. æD     noAdrMkErr = -67, /*couldn't find valid addr mark*/
  21140. æC 
  21141.  
  21142. æKY dataVerErr
  21143. æFc Errors.h
  21144. æT 
  21145. æD     dataVerErr = -68, /*read verify compare failed*/
  21146. æC 
  21147.  
  21148. æKY badCksmErr
  21149. æFc Errors.h
  21150. æT 
  21151. æD     badCksmErr = -69, /*addr mark checksum didn't check*/
  21152. æC 
  21153.  
  21154. æKY badBtSlpErr
  21155. æFc Errors.h
  21156. æT 
  21157. æD     badBtSlpErr = -70, /*bad addr mark bit slip nibbles*/
  21158. æC 
  21159.  
  21160. æKY noDtaMkErr
  21161. æFc Errors.h
  21162. æT 
  21163. æD     noDtaMkErr = -71, /*couldn't find a data mark header*/
  21164. æC 
  21165.  
  21166. æKY badDCksum
  21167. æFc Errors.h
  21168. æT 
  21169. æD     badDCksum = -72, /*bad data mark checksum*/
  21170. æC 
  21171.  
  21172. æKY badDBtSlp
  21173. æFc Errors.h
  21174. æT 
  21175. æD     badDBtSlp = -73, /*bad data mark bit slip nibbles*/
  21176. æC 
  21177.  
  21178. æKY wrUnderrun
  21179. æFc Errors.h
  21180. æT 
  21181. æD     wrUnderrun = -74, /*write underrun occurred*/
  21182. æC 
  21183.  
  21184. æKY cantStepErr
  21185. æFc Errors.h
  21186. æT 
  21187. æD     cantStepErr = -75, /*step handshake failed*/
  21188. æC 
  21189.  
  21190. æKY tk0BadErr
  21191. æFc Errors.h
  21192. æT 
  21193. æD     tk0BadErr = -76, /*track 0 detect doesn't change*/
  21194. æC 
  21195.  
  21196. æKY initIWMErr
  21197. æFc Errors.h
  21198. æT 
  21199. æD     initIWMErr = -77, /*unable to initialize IWM*/
  21200. æC 
  21201.  
  21202. æKY twoSideErr
  21203. æFc Errors.h
  21204. æT 
  21205. æD     twoSideErr = -78, /*tried to read 2nd side on a 1-sided drive*/
  21206. æC 
  21207.  
  21208. æKY spdAdjErr
  21209. æFc Errors.h
  21210. æT 
  21211. æD     spdAdjErr = -79, /*unable to correctly adjust disk speed*/
  21212. æC 
  21213.  
  21214. æKY seekErr
  21215. æFc Errors.h
  21216. æT 
  21217. æD     seekErr = -80, /*track number wrong on address mark*/
  21218. æC 
  21219.  
  21220. æKY sectNFErr
  21221. æFc Errors.h
  21222. æT 
  21223. æD     sectNFErr = -81, /*sector number never found on a track*/
  21224. æC 
  21225.  
  21226. æKY fmt1Err
  21227. æFc Errors.h
  21228. æT 
  21229. æD     fmt1Err = -82, /*can't find sector 0 after track format*/
  21230. æC 
  21231.  
  21232. æKY fmt2Err
  21233. æFc Errors.h
  21234. æT 
  21235. æD     fmt2Err = -83, /*can't get enough sync*/
  21236. æC 
  21237.  
  21238. æKY verErr
  21239. æFc Errors.h
  21240. æT 
  21241. æD     verErr = -84, /*track failed to verify*/
  21242. æC 
  21243.  
  21244. æKY clkRdErr
  21245. æFc Errors.h
  21246. æT 
  21247. æD     clkRdErr = -85, /*unable to read same clock value twice*/
  21248. æC 
  21249.  
  21250. æKY clkWrErr
  21251. æFc Errors.h
  21252. æT 
  21253. æD     clkWrErr = -86, /*time written did not verify*/
  21254. æC 
  21255.  
  21256. æKY prWrErr
  21257. æFc Errors.h
  21258. æT 
  21259. æD     prWrErr = -87, /*parameter ram written didn't read-verify*/
  21260. æC 
  21261.  
  21262. æKY prInitErr
  21263. æFc Errors.h
  21264. æT 
  21265. æD     prInitErr = -88, /*InitUtil found the parameter ram uninitialized*/
  21266. æC 
  21267.  
  21268. æKY rcvrErr
  21269. æFc Errors.h
  21270. æT 
  21271. æD     rcvrErr = -89, /*SCC receiver error (framing; parity; OR)*/
  21272. æC 
  21273.  
  21274. æKY breakRecd
  21275. æFc Errors.h
  21276. æT 
  21277. æD     breakRecd = -90, /*Break received (SCC)*/
  21278. æC 
  21279.  
  21280. æKY pmBusyErr
  21281. æFc Errors.h
  21282. æT 
  21283. æD     pmBusyErr = -13000, /*Power Mgr never ready to start handshake*/
  21284. æC 
  21285.  
  21286. æKY pmReplyTOErr
  21287. æFc Errors.h
  21288. æT 
  21289. æD     pmReplyTOErr = -13001, /*Timed out waiting for reply*/
  21290. æC 
  21291.  
  21292. æKY pmSendStartErr
  21293. æFc Errors.h
  21294. æT 
  21295. æD     pmSendStartErr = -13002, /*during send, pmgr did not start hs*/
  21296. æC 
  21297.  
  21298. æKY pmSendEndErr
  21299. æFc Errors.h
  21300. æT 
  21301. æD     pmSendEndErr = -13003, /*during send, pmgr did not finish hs*/
  21302. æC 
  21303.  
  21304. æKY pmRecvStartErr
  21305. æFc Errors.h
  21306. æT 
  21307. æD     pmRecvStartErr = -13004, /*during receive, pmgr did not start hs*/
  21308. æC 
  21309.  
  21310. æKY pmRecvEndErr
  21311. æFc Errors.h
  21312. æT 
  21313. æD     pmRecvEndErr = -13005, /*during receive, pmgr did not finish hs configured for this connection*/
  21314. æC 
  21315.  
  21316. æKY noScrapErr
  21317. æFc Errors.h
  21318. æT 
  21319. æD     noScrapErr = -100, /*No scrap exists error*/
  21320. æC 
  21321.  
  21322. æKY noTypeErr
  21323. æFc Errors.h
  21324. æT 
  21325. æD     noTypeErr = -102, /*No object of that type in scrap*/
  21326. æC 
  21327.  
  21328. æKY memROZWarn
  21329. æFc Errors.h
  21330. æT 
  21331. æD     memROZWarn = -99, /*soft error in ROZ*/
  21332. æC 
  21333.  
  21334. æKY memROZError
  21335. æFc Errors.h
  21336. æT 
  21337. æD     memROZError = -99, /*hard error in ROZ*/
  21338. æC 
  21339.  
  21340. æKY memROZErr
  21341. æFc Errors.h
  21342. æT 
  21343. æD     memROZErr = -99, /*hard error in ROZ*/
  21344. æC 
  21345.  
  21346. æKY memFullErr
  21347. æFc Errors.h
  21348. æT 
  21349. æD     memFullErr = -108, /*Not enough room in heap zone*/
  21350. æC 
  21351.  
  21352. æKY nilHandleErr
  21353. æFc Errors.h
  21354. æT 
  21355. æD     nilHandleErr = -109, /*Master Pointer was NIL in HandleZone or other*/
  21356. æC 
  21357.  
  21358. æKY memWZErr
  21359. æFc Errors.h
  21360. æT 
  21361. æD     memWZErr = -111, /*WhichZone failed (applied to free block)*/
  21362. æC 
  21363.  
  21364. æKY memPurErr
  21365. æFc Errors.h
  21366. æT 
  21367. æD     memPurErr = -112, /*trying to purge a locked or non-purgeable block*/
  21368. æC 
  21369.  
  21370. æKY memAdrErr
  21371. æFc Errors.h
  21372. æT 
  21373. æD     memAdrErr = -110, /*address was odd; or out of range*/
  21374. æC 
  21375.  
  21376. æKY memAZErr
  21377. æFc Errors.h
  21378. æT 
  21379. æD     memAZErr = -113, /*Address in zone check failed*/
  21380. æC 
  21381.  
  21382. æKY memPCErr
  21383. æFc Errors.h
  21384. æT 
  21385. æD     memPCErr = -114, /*Pointer Check failed*/
  21386. æC 
  21387.  
  21388. æKY memBCErr
  21389. æFc Errors.h
  21390. æT 
  21391. æD     memBCErr = -115, /*Block Check failed*/
  21392. æC 
  21393.  
  21394. æKY memSCErr
  21395. æFc Errors.h
  21396. æT 
  21397. æD     memSCErr = -116, /*Size Check failed*/
  21398. æC 
  21399.  
  21400. æKY memLockedErr
  21401. æFc Errors.h
  21402. æT 
  21403. æD     memLockedErr = -117, /*trying to move a locked block (MoveHHi)*/
  21404. æC 
  21405.  
  21406. æKY resNotFound
  21407. æFc Errors.h
  21408. æT 
  21409. æD     resNotFound = -192, /*Resource not found*/
  21410. æC 
  21411.  
  21412. æKY resFNotFound
  21413. æFc Errors.h
  21414. æT 
  21415. æD     resFNotFound = -193, /*Resource file not found*/
  21416. æC 
  21417.  
  21418. æKY addResFailed
  21419. æFc Errors.h
  21420. æT 
  21421. æD     addResFailed = -194, /*AddResource failed*/
  21422. æC 
  21423.  
  21424. æKY addRefFailed
  21425. æFc Errors.h
  21426. æT 
  21427. æD     addRefFailed = -195, /*AddReference failed*/
  21428. æC 
  21429.  
  21430. æKY rmvResFailed
  21431. æFc Errors.h
  21432. æT 
  21433. æD     rmvResFailed = -196, /*RmveResource failed*/
  21434. æC 
  21435.  
  21436. æKY rmvRefFailed
  21437. æFc Errors.h
  21438. æT 
  21439. æD     rmvRefFailed = -197, /*RmveReference failed*/
  21440. æC 
  21441.  
  21442. æKY resAttrErr
  21443. æFc Errors.h
  21444. æT 
  21445. æD     resAttrErr = -198, /*attribute inconsistent with operation*/
  21446. æC 
  21447.  
  21448. æKY mapReadErr
  21449. æFc Errors.h
  21450. æT 
  21451. æD     mapReadErr = -199, /*map inconsistent with operation*/
  21452. æC 
  21453.  
  21454. æKY CantDecompress
  21455. æFc Errors.h
  21456. æT 
  21457. æD     CantDecompress = -186, /*resource bent ("the bends") - can't decompress a compressed resource*/
  21458. æC 
  21459.  
  21460. æKY badExtResource
  21461. æFc Errors.h
  21462. æT 
  21463. æD     badExtResource = -185, /*extended resource has a bad format.*/
  21464. æC 
  21465.  
  21466. æKY evtNotEnb
  21467. æFc Errors.h
  21468. æT 
  21469. æD     evtNotEnb = 1, /*event not enabled at PostEvent*/
  21470. æC 
  21471.  
  21472. æKY noMemForPictPlaybackErr
  21473. æFc Errors.h
  21474. æT 
  21475. æD     noMemForPictPlaybackErr = -145,
  21476. æC 
  21477.  
  21478. æKY rgnTooBigError
  21479. æFc Errors.h
  21480. æT 
  21481. æD     rgnTooBigError = -147,
  21482. æC 
  21483.  
  21484. æKY pixMapTooDeepErr
  21485. æFc Errors.h
  21486. æT 
  21487. æD     pixMapTooDeepErr = -148,
  21488. æC 
  21489.  
  21490. æKY nsStackErr
  21491. æFc Errors.h
  21492. æT 
  21493. æD     nsStackErr = -149,
  21494. æC 
  21495.  
  21496. æKY cMatchErr
  21497. æFc Errors.h
  21498. æT 
  21499. æD     cMatchErr = -150, /*Color2Index failed to find an index*/
  21500. æC 
  21501.  
  21502. æKY cTempMemErr
  21503. æFc Errors.h
  21504. æT 
  21505. æD     cTempMemErr = -151, /*failed to allocate memory for temporary structures*/
  21506. æC 
  21507.  
  21508. æKY cNoMemErr
  21509. æFc Errors.h
  21510. æT 
  21511. æD     cNoMemErr = -152, /*failed to allocate memory for structure*/
  21512. æC 
  21513.  
  21514. æKY cRangeErr
  21515. æFc Errors.h
  21516. æT 
  21517. æD     cRangeErr = -153, /*range error on colorTable request*/
  21518. æC 
  21519.  
  21520. æKY cProtectErr
  21521. æFc Errors.h
  21522. æT 
  21523. æD     cProtectErr = -154, /*colorTable entry protection violation*/
  21524. æC 
  21525.  
  21526. æKY cDevErr
  21527. æFc Errors.h
  21528. æT 
  21529. æD     cDevErr = -155, /*invalid type of graphics device*/
  21530. æC 
  21531.  
  21532. æKY cResErr
  21533. æFc Errors.h
  21534. æT 
  21535. æD     cResErr = -156, /*invalid resolution for MakeITable*/
  21536. æC 
  21537.  
  21538. æKY rgnTooBigErr
  21539. æFc Errors.h
  21540. æT 
  21541. æD     rgnTooBigErr = -500,
  21542. æC 
  21543.  
  21544. æKY updPixMemErr
  21545. æFc Errors.h
  21546. æT 
  21547. æD     updPixMemErr = -125, /*insufficient memory to update a pixmap*/
  21548. æC /*insuffiFc Errors.h
  21549. CIent memory to update a pixmap*/
  21550.  
  21551. æKY pictInfoVersionErr
  21552. æFc Errors.h
  21553. æT 
  21554. æD     pictInfoVersionErr = -11000, /* wrong version of the PictInfo structure */
  21555. æC 
  21556.  
  21557. æKY pictInfoIDErr
  21558. æFc Errors.h
  21559. æT 
  21560. æD     pictInfoIDErr = -11001, /* the internal consistancy check for the PictInfoID is wrong */
  21561. æC 
  21562.  
  21563. æKY pictInfoVerbErr
  21564. æFc Errors.h
  21565. æT 
  21566. æD     pictInfoVerbErr = -11002, /* the passed verb was invalid */
  21567. æC 
  21568.  
  21569. æKY cantLoadPickMethodErr
  21570. æFc Errors.h
  21571. æT 
  21572. æD     cantLoadPickMethodErr = -11003, /* unable to load the custom pick proc */
  21573. æC 
  21574.  
  21575. æKY colorsRequestedErr
  21576. æFc Errors.h
  21577. æT 
  21578. æD     colorsRequestedErr = -11004, /* the number of colors requested was illegal */
  21579. æC 
  21580.  
  21581. æKY pictureDataErr
  21582. æFc Errors.h
  21583. æT 
  21584. æD     pictureDataErr = -11005, /* the picture data was invalid */
  21585. æC 
  21586.  
  21587. æKY noHardware
  21588. æFc Errors.h
  21589. æT 
  21590. æD     noHardware = noHardwareErr,    /* *** obsolete spelling */
  21591. æC 
  21592.  
  21593. æKY notEnoughHardware
  21594. æFc Errors.h
  21595. æT 
  21596. æD     notEnoughHardware = notEnoughHardwareErr,     /* *** obsolete spelling */
  21597. æC 
  21598.  
  21599. æKY queueFull
  21600. æFc Errors.h
  21601. æT 
  21602. æD     queueFull = -203, /*Sound Manager Error Returns*/
  21603. æC 
  21604.  
  21605. æKY resProblem
  21606. æFc Errors.h
  21607. æT 
  21608. æD     resProblem = -204, /*Sound Manager Error Returns*/
  21609. æC 
  21610.  
  21611. æKY badChannel
  21612. æFc Errors.h
  21613. æT 
  21614. æD     badChannel = -205, /*Sound Manager Error Returns*/
  21615. æC 
  21616.  
  21617. æKY badFormat
  21618. æFc Errors.h
  21619. æT 
  21620. æD     badFormat = -206, /*Sound Manager Error Returns*/
  21621. æC 
  21622.  
  21623. æKY notEnoughBufferSpace
  21624. æFc Errors.h
  21625. æT 
  21626. æD     notEnoughBufferSpace = -207, /* could not allocate enough memory */
  21627. æC 
  21628.  
  21629. æKY badFileFormat
  21630. æFc Errors.h
  21631. æT 
  21632. æD     badFileFormat = -208, /* was not type AIFF or was of bad format,corrupt */
  21633. æC 
  21634.  
  21635. æKY channelBusy
  21636. æFc Errors.h
  21637. æT 
  21638. æD     channelBusy = -209, /* the Channel is being used for a PFD already */
  21639. æC 
  21640.  
  21641. æKY buffersTooSmall
  21642. æFc Errors.h
  21643. æT 
  21644. æD     buffersTooSmall = -210, /* can not operate in the memory allowed */
  21645. æC 
  21646.  
  21647. æKY channelNotBusy
  21648. æFc Errors.h
  21649. æT 
  21650. æD     channelNotBusy = -211,
  21651. æC 
  21652.  
  21653. æKY noMoreRealTime
  21654. æFc Errors.h
  21655. æT 
  21656. æD     noMoreRealTime = -212, /* not enough CPU cycles left to add another task */
  21657. æC 
  21658.  
  21659. æKY siNoSoundInHardware
  21660. æFc Errors.h
  21661. æT 
  21662. æD     siNoSoundInHardware = -220, /*no Sound Input hardware*/
  21663. æC 
  21664.  
  21665. æKY siBadSoundInDevice
  21666. æFc Errors.h
  21667. æT 
  21668. æD     siBadSoundInDevice = -221, /*invalid index passed to SoundInGetIndexedDevice*/
  21669. æC 
  21670.  
  21671. æKY siNoBufferSpecified
  21672. æFc Errors.h
  21673. æT 
  21674. æD     siNoBufferSpecified = -222, /*returned by synchronous SPBRecord if nil buffer passed*/
  21675. æC 
  21676.  
  21677. æKY siInvalidCompression
  21678. æFc Errors.h
  21679. æT 
  21680. æD     siInvalidCompression = -223, /*invalid compression type*/
  21681. æC 
  21682.  
  21683. æKY siHardDriveTooSlow
  21684. æFc Errors.h
  21685. æT 
  21686. æD     siHardDriveTooSlow = -224, /*hard drive too slow to record to disk*/
  21687. æC 
  21688.  
  21689. æKY siInvalidSampleRate
  21690. æFc Errors.h
  21691. æT 
  21692. æD     siInvalidSampleRate = -225, /*invalid sample rate*/
  21693. æC 
  21694.  
  21695. æKY siInvalidSampleSize
  21696. æFc Errors.h
  21697. æT 
  21698. æD     siInvalidSampleSize = -226, /*invalid sample size*/
  21699. æC 
  21700.  
  21701. æKY siDeviceBusyErr
  21702. æFc Errors.h
  21703. æT 
  21704. æD     siDeviceBusyErr = -227, /*input device already in use*/
  21705. æC 
  21706.  
  21707. æKY siBadDeviceName
  21708. æFc Errors.h
  21709. æT 
  21710. æD     siBadDeviceName = -228, /*input device could not be opened*/
  21711. æC 
  21712.  
  21713. æKY siBadRefNum
  21714. æFc Errors.h
  21715. æT 
  21716. æD     siBadRefNum = -229, /*invalid input device reference number*/
  21717. æC 
  21718.  
  21719. æKY siInputDeviceErr
  21720. æFc Errors.h
  21721. æT 
  21722. æD     siInputDeviceErr = -230, /*input device hardware failure*/
  21723. æC 
  21724.  
  21725. æKY siUnknownInfoType
  21726. æFc Errors.h
  21727. æT 
  21728. æD     siUnknownInfoType = -231, /*invalid info type selector (returned by driver)*/
  21729. æC 
  21730.  
  21731. æKY siUnknownQuality
  21732. æFc Errors.h
  21733. æT 
  21734. æD     siUnknownQuality = -232, /*invalid quality selector (returned by driver)*/
  21735. æC 
  21736.  
  21737. æKY nmTypErr
  21738. æFc Errors.h
  21739. æT 
  21740. æD     nmTypErr = -299, /*wrong queue type*/
  21741. æC 
  21742.  
  21743. æKY siInitSDTblErr
  21744. æFc Errors.h
  21745. æT 
  21746. æD     siInitSDTblErr = 1, /*slot int dispatch table could not be initialized.*/
  21747. æC 
  21748.  
  21749. æKY siInitVBLQsErr
  21750. æFc Errors.h
  21751. æT 
  21752. æD     siInitVBLQsErr = 2, /*VBLqueues for all slots could not be initialized.*/
  21753. æC 
  21754.  
  21755. æKY siInitSPTblErr
  21756. æFc Errors.h
  21757. æT 
  21758. æD     siInitSPTblErr = 3, /*slot priority table could not be initialized.*/
  21759. æC 
  21760.  
  21761. æKY sdmJTInitErr
  21762. æFc Errors.h
  21763. æT 
  21764. æD     sdmJTInitErr = 10, /*SDM Jump Table could not be initialized.*/
  21765. æC 
  21766.  
  21767. æKY sdmInitErr
  21768. æFc Errors.h
  21769. æT 
  21770. æD     sdmInitErr = 11, /*SDM could not be initialized.*/
  21771. æC 
  21772.  
  21773. æKY sdmSRTInitErr
  21774. æFc Errors.h
  21775. æT 
  21776. æD     sdmSRTInitErr = 12, /*Slot Resource Table could not be initialized.*/
  21777. æC 
  21778.  
  21779. æKY sdmPRAMInitErr
  21780. æFc Errors.h
  21781. æT 
  21782. æD     sdmPRAMInitErr = 13, /*Slot PRAM could not be initialized.*/
  21783. æC 
  21784.  
  21785. æKY sdmPriInitErr
  21786. æFc Errors.h
  21787. æT 
  21788. æD     sdmPriInitErr = 14, /*Cards could not be initialized.*/
  21789. æC 
  21790.  
  21791. æKY smSDMInitErr
  21792. æFc Errors.h
  21793. æT 
  21794. æD     smSDMInitErr = -290, /*Error; SDM could not be initialized.*/
  21795. æC 
  21796.  
  21797. æKY smSRTInitErr
  21798. æFc Errors.h
  21799. æT 
  21800. æD     smSRTInitErr = -291, /*Error; Slot Resource Table could not be initialized.*/
  21801. æC 
  21802.  
  21803. æKY smPRAMInitErr
  21804. æFc Errors.h
  21805. æT 
  21806. æD     smPRAMInitErr = -292, /*Error; Slot Resource Table could not be initialized.*/
  21807. æC 
  21808.  
  21809. æKY smPriInitErr
  21810. æFc Errors.h
  21811. æT 
  21812. æD     smPriInitErr = -293, /*Error; Cards could not be initialized.*/
  21813. æC 
  21814.  
  21815. æKY smEmptySlot
  21816. æFc Errors.h
  21817. æT 
  21818. æD     smEmptySlot = -300, /*No card in slot*/
  21819. æC 
  21820.  
  21821. æKY smCRCFail
  21822. æFc Errors.h
  21823. æT 
  21824. æD     smCRCFail = -301, /*CRC check failed for declaration data*/
  21825. æC 
  21826.  
  21827. æKY smFormatErr
  21828. æFc Errors.h
  21829. æT 
  21830. æD     smFormatErr = -302, /*FHeader Format is not Apple's*/
  21831. æC 
  21832.  
  21833. æKY smRevisionErr
  21834. æFc Errors.h
  21835. æT 
  21836. æD     smRevisionErr = -303, /*Wrong revison level*/
  21837. æC 
  21838.  
  21839. æKY smNoDir
  21840. æFc Errors.h
  21841. æT 
  21842. æD     smNoDir = -304, /*Directory offset is Nil */
  21843. æC 
  21844.  
  21845. æKY smDisabledSlot
  21846. æFc Errors.h
  21847. æT 
  21848. æD     smDisabledSlot = -305, /*This slot is disabled (-305 use to be smLWTstBad)*/
  21849. æC 
  21850.  
  21851. æKY smNosInfoArray
  21852. æFc Errors.h
  21853. æT 
  21854. æD     smNosInfoArray = -306, /*No sInfoArray. Memory Mgr error.*/
  21855. æC 
  21856.  
  21857. æKY smResrvErr
  21858. æFc Errors.h
  21859. æT 
  21860. æD     smResrvErr = -307, /*Fatal reserved error. Resreved field <> 0.*/
  21861. æC 
  21862.  
  21863. æKY smUnExBusErr
  21864. æFc Errors.h
  21865. æT 
  21866. æD     smUnExBusErr = -308, /*Unexpected BusError*/
  21867. æC 
  21868.  
  21869. æKY smBLFieldBad
  21870. æFc Errors.h
  21871. æT 
  21872. æD     smBLFieldBad = -309, /*ByteLanes field was bad.*/
  21873. æC 
  21874.  
  21875. æKY smFHBlockRdErr
  21876. æFc Errors.h
  21877. æT 
  21878. æD     smFHBlockRdErr = -310, /*Error occured during _sGetFHeader.*/
  21879. æC 
  21880.  
  21881. æKY smFHBlkDispErr
  21882. æFc Errors.h
  21883. æT 
  21884. æD     smFHBlkDispErr = -311, /*Error occured during _sDisposePtr (Dispose of FHeader block).*/
  21885. æC 
  21886.  
  21887. æKY smDisposePErr
  21888. æFc Errors.h
  21889. æT 
  21890. æD     smDisposePErr = -312, /*_DisposePointer error*/
  21891. æC 
  21892.  
  21893. æKY smNoBoardSRsrc
  21894. æFc Errors.h
  21895. æT 
  21896. æD     smNoBoardSRsrc = -313, /*No Board sResource.*/
  21897. æC 
  21898.  
  21899. æKY smGetPRErr
  21900. æFc Errors.h
  21901. æT 
  21902. æD     smGetPRErr = -314, /*Error occured during _sGetPRAMRec (See SIMStatus).*/
  21903. æC 
  21904.  
  21905. æKY smNoBoardId
  21906. æFc Errors.h
  21907. æT 
  21908. æD     smNoBoardId = -315, /*No Board Id.*/
  21909. æC 
  21910.  
  21911. æKY smInitStatVErr
  21912. æFc Errors.h
  21913. æT 
  21914. æD     smInitStatVErr = -316, /*The InitStatusV field was negative after primary or secondary init.*/
  21915. æC 
  21916.  
  21917. æKY smInitTblVErr
  21918. æFc Errors.h
  21919. æT 
  21920. æD     smInitTblVErr = -317, /*An error occured while trying to initialize the Slot Resource Table.*/
  21921. æC 
  21922.  
  21923. æKY smNoJmpTbl
  21924. æFc Errors.h
  21925. æT 
  21926. æD     smNoJmpTbl = -318, /*SDM jump table could not be created.*/
  21927. æC 
  21928.  
  21929. æKY smBadBoardId
  21930. æFc Errors.h
  21931. æT 
  21932. æD     smBadBoardId = -319, /*BoardId was wrong; re-init the PRAM record.*/
  21933. æC 
  21934.  
  21935. æKY smBusErrTO
  21936. æFc Errors.h
  21937. æT 
  21938. æD     smBusErrTO = -320, /*BusError time out.*/
  21939. æC 
  21940.  
  21941. æKY svTempDisable
  21942. æFc Errors.h
  21943. æT 
  21944. æD     svTempDisable = -32768, /*Temporarily disable card but run primary init.*/
  21945. æC 
  21946.  
  21947. æKY svDisabled
  21948. æFc Errors.h
  21949. æT 
  21950. æD     svDisabled = -32640, /*Reserve range -32640 to -32768 for Apple temp disables.*/
  21951. æC 
  21952.  
  21953. æKY smBadRefId
  21954. æFc Errors.h
  21955. æT 
  21956. æD     smBadRefId = -330, /*Reference Id not found in List*/
  21957. æC 
  21958.  
  21959. æKY smBadsList
  21960. æFc Errors.h
  21961. æT 
  21962. æD     smBadsList = -331, /*Bad sList: Id1 < Id2 < Id3 ...format is not followed.*/
  21963. æC 
  21964.  
  21965. æKY smReservedErr
  21966. æFc Errors.h
  21967. æT 
  21968. æD     smReservedErr = -332, /*Reserved field not zero*/
  21969. æC 
  21970.  
  21971. æKY smCodeRevErr
  21972. æFc Errors.h
  21973. æT 
  21974. æD     smCodeRevErr = -333, /*Code revision is wrong*/
  21975. æC 
  21976.  
  21977. æKY smCPUErr
  21978. æFc Errors.h
  21979. æT 
  21980. æD     smCPUErr = -334, /*Code revision is wrong*/
  21981. æC 
  21982.  
  21983. æKY smsPointerNil
  21984. æFc Errors.h
  21985. æT 
  21986. æD     smsPointerNil = -335, /*LPointer is nil From sOffsetData. If this error occurs; check sInfo rec for more information.*/
  21987. æC 
  21988.  
  21989. æKY smNilsBlockErr
  21990. æFc Errors.h
  21991. æT 
  21992. æD     smNilsBlockErr = -336, /*Nil sBlock error (Dont allocate and try to use a nil sBlock)*/
  21993. æC 
  21994.  
  21995. æKY smSlotOOBErr
  21996. æFc Errors.h
  21997. æT 
  21998. æD     smSlotOOBErr = -337, /*Slot out of bounds error*/
  21999. æC 
  22000.  
  22001. æKY smSelOOBErr
  22002. æFc Errors.h
  22003. æT 
  22004. æD     smSelOOBErr = -338, /*Selector out of bounds error*/
  22005. æC 
  22006.  
  22007. æKY smNewPErr
  22008. æFc Errors.h
  22009. æT 
  22010. æD     smNewPErr = -339, /*_NewPtr error*/
  22011. æC 
  22012.  
  22013. æKY smBlkMoveErr
  22014. æFc Errors.h
  22015. æT 
  22016. æD     smBlkMoveErr = -340, /*_BlockMove error*/
  22017. æC 
  22018.  
  22019. æKY smCkStatusErr
  22020. æFc Errors.h
  22021. æT 
  22022. æD     smCkStatusErr = -341, /*Status of slot = fail.*/
  22023. æC 
  22024.  
  22025. æKY smGetDrvrNamErr
  22026. æFc Errors.h
  22027. æT 
  22028. æD     smGetDrvrNamErr = -342, /*Error occured during _sGetDrvrName.*/
  22029. æC 
  22030.  
  22031. æKY smDisDrvrNamErr
  22032. æFc Errors.h
  22033. æT 
  22034. æD     smDisDrvrNamErr = -343, /*Error occured during _sDisDrvrName.*/
  22035. æC 
  22036.  
  22037. æKY smNoMoresRsrcs
  22038. æFc Errors.h
  22039. æT 
  22040. æD     smNoMoresRsrcs = -344, /*No more sResources*/
  22041. æC 
  22042.  
  22043. æKY smsGetDrvrErr
  22044. æFc Errors.h
  22045. æT 
  22046. æD     smsGetDrvrErr = -345, /*Error occurred during _sGetDriver.*/
  22047. æC 
  22048.  
  22049. æKY smBadsPtrErr
  22050. æFc Errors.h
  22051. æT 
  22052. æD     smBadsPtrErr = -346, /*Bad pointer was passed to sCalcsPointer*/
  22053. æC 
  22054.  
  22055. æKY smByteLanesErr
  22056. æFc Errors.h
  22057. æT 
  22058. æD     smByteLanesErr = -347, /*NumByteLanes was determined to be zero.*/
  22059. æC 
  22060.  
  22061. æKY smOffsetErr
  22062. æFc Errors.h
  22063. æT 
  22064. æD     smOffsetErr = -348, /*Offset was too big (temporary error*/
  22065. æC 
  22066.  
  22067. æKY smNoGoodOpens
  22068. æFc Errors.h
  22069. æT 
  22070. æD     smNoGoodOpens = -349, /*No opens were successfull in the loop.*/
  22071. æC 
  22072.  
  22073. æKY smSRTOvrFlErr
  22074. æFc Errors.h
  22075. æT 
  22076. æD     smSRTOvrFlErr = -350, /*SRT over flow.*/
  22077. æC 
  22078.  
  22079. æKY smRecNotFnd
  22080. æFc Errors.h
  22081. æT 
  22082. æD     smRecNotFnd = -351, /*Record not found in the SRT.*/
  22083. æC 
  22084.  
  22085. æKY editionMgrInitErr
  22086. æFc Errors.h
  22087. æT 
  22088. æD     editionMgrInitErr = -450, /*edition manager not inited by this app*/
  22089. æC 
  22090.  
  22091. æKY badSectionErr
  22092. æFc Errors.h
  22093. æT 
  22094. æD     badSectionErr = -451, /*not a valid SectionRecord*/
  22095. æC 
  22096.  
  22097. æKY notRegisteredSectionErr
  22098. æFc Errors.h
  22099. æT 
  22100. æD     notRegisteredSectionErr = -452, /*not a registered SectionRecord*/
  22101. æC 
  22102.  
  22103. æKY badEditionFileErr
  22104. æFc Errors.h
  22105. æT 
  22106. æD     badEditionFileErr = -453, /*edition file is corrupt*/
  22107. æC 
  22108.  
  22109. æKY badSubPartErr
  22110. æFc Errors.h
  22111. æT 
  22112. æD     badSubPartErr = -454, /*can not use sub parts in this release*/
  22113. æC 
  22114.  
  22115. æKY multiplePublisherWrn
  22116. æFc Errors.h
  22117. æT 
  22118. æD     multiplePublisherWrn = -460, /*A Publisher is already registered for that container*/
  22119. æC 
  22120.  
  22121. æKY containerNotFoundWrn
  22122. æFc Errors.h
  22123. æT 
  22124. æD     containerNotFoundWrn = -461, /*could not find editionContainer at this time*/
  22125. æC 
  22126.  
  22127. æKY containerAlreadyOpenWrn
  22128. æFc Errors.h
  22129. æT 
  22130. æD     containerAlreadyOpenWrn = -462, /*container already opened by this section*/
  22131. æC 
  22132.  
  22133. æKY notThePublisherWrn
  22134. æFc Errors.h
  22135. æT 
  22136. æD     notThePublisherWrn = -463, /*not the first registered publisher for that container*/
  22137. æC 
  22138.  
  22139. æKY teScrapSizeErr
  22140. æFc Errors.h
  22141. æT 
  22142. æD     teScrapSizeErr = -501, /*scrap item too big for text edit record*/
  22143. æC 
  22144.  
  22145. æKY hwParamErr
  22146. æFc Errors.h
  22147. æT 
  22148. æD     hwParamErr = -502, /*bad selector for _HWPriv*/
  22149. æC 
  22150.  
  22151. æKY procNotFound
  22152. æFc Errors.h
  22153. æT 
  22154. æD     procNotFound = -600, /* no eligible process with specified descriptor */
  22155. æC 
  22156.  
  22157. æKY memFragErr
  22158. æFc Errors.h
  22159. æT 
  22160. æD     memFragErr = -601, /* not enough room to launch app w/special requirements */
  22161. æC 
  22162.  
  22163. æKY appModeErr
  22164. æFc Errors.h
  22165. æT 
  22166. æD     appModeErr = -602, /* memory mode is 32-bit, but app not 32-bit clean */
  22167. æC 
  22168.  
  22169. æKY protocolErr
  22170. æFc Errors.h
  22171. æT 
  22172. æD     protocolErr = -603, /* app made module calls in improper order */
  22173. æC 
  22174.  
  22175. æKY hardwareConfigErr
  22176. æFc Errors.h
  22177. æT 
  22178. æD     hardwareConfigErr = -604, /* hardware configuration not correct for call */
  22179. æC 
  22180.  
  22181. æKY appMemFullErr
  22182. æFc Errors.h
  22183. æT 
  22184. æD     appMemFullErr = -605, /* application SIZE not big enough for launch */
  22185. æC 
  22186.  
  22187. æKY appIsDaemon
  22188. æFc Errors.h
  22189. æT 
  22190. æD     appIsDaemon = -606, /* app is BG-only, and launch flags disallow this */
  22191. æC 
  22192.  
  22193. æKY notEnoughMemoryErr
  22194. æFc Errors.h
  22195. æT 
  22196. æD     notEnoughMemoryErr = -620, /*insufficient physical memory*/
  22197. æC 
  22198.  
  22199. æKY notHeldErr
  22200. æFc Errors.h
  22201. æT 
  22202. æD     notHeldErr = -621, /*specified range of memory is not held*/
  22203. æC 
  22204.  
  22205. æKY cannotMakeContiguousErr
  22206. æFc Errors.h
  22207. æT 
  22208. æD     cannotMakeContiguousErr = -622, /*cannot make specified range contiguous*/
  22209. æC 
  22210.  
  22211. æKY notLockedErr
  22212. æFc Errors.h
  22213. æT 
  22214. æD     notLockedErr = -623, /*specified range of memory is not locked*/
  22215. æC 
  22216.  
  22217. æKY interruptsMaskedErr
  22218. æFc Errors.h
  22219. æT 
  22220. æD     interruptsMaskedErr = -624, /*don’t call with interrupts masked*/
  22221. æC 
  22222.  
  22223. æKY cannotDeferErr
  22224. æFc Errors.h
  22225. æT 
  22226. æD     cannotDeferErr = -625, /*unable to defer additional functions*/
  22227. æC 
  22228.  
  22229. æKY ddpSktErr
  22230. æFc Errors.h
  22231. æT 
  22232. æD     ddpSktErr = -91, /*error in soket number*/
  22233. æC 
  22234.  
  22235. æKY ddpLenErr
  22236. æFc Errors.h
  22237. æT 
  22238. æD     ddpLenErr = -92, /*data length too big*/
  22239. æC 
  22240.  
  22241. æKY noBridgeErr
  22242. æFc Errors.h
  22243. æT 
  22244. æD     noBridgeErr = -93, /*no network bridge for non-local send*/
  22245. æC 
  22246.  
  22247. æKY lapProtErr
  22248. æFc Errors.h
  22249. æT 
  22250. æD     lapProtErr = -94, /*error in attaching/detaching protocol*/
  22251. æC 
  22252.  
  22253. æKY excessCollsns
  22254. æFc Errors.h
  22255. æT 
  22256. æD     excessCollsns = -95, /*excessive collisions on write*/
  22257. æC 
  22258.  
  22259. æKY portInUse
  22260. æFc Errors.h
  22261. æT 
  22262. æD     portInUse = -97, /*driver Open error code (port is in use)*/
  22263. æC 
  22264.  
  22265. æKY portNotCf
  22266. æFc Errors.h
  22267. æT 
  22268. æD     portNotCf = -98, /*driver Open error code (parameter RAM not configured for this connection)*/
  22269. æC 
  22270.  
  22271. æKY nbpBuffOvr
  22272. æFc Errors.h
  22273. æT 
  22274. æD     nbpBuffOvr = -1024, /*Buffer overflow in LookupName*/
  22275. æC 
  22276.  
  22277. æKY nbpNoConfirm
  22278. æFc Errors.h
  22279. æT 
  22280. æD     nbpNoConfirm = -1025,
  22281. æC 
  22282.  
  22283. æKY nbpConfDiff
  22284. æFc Errors.h
  22285. æT 
  22286. æD     nbpConfDiff = -1026, /*Name confirmed at different socket*/
  22287. æC 
  22288.  
  22289. æKY nbpDuplicate
  22290. æFc Errors.h
  22291. æT 
  22292. æD     nbpDuplicate = -1027, /*Duplicate name exists already*/
  22293. æC 
  22294.  
  22295. æKY nbpNotFound
  22296. æFc Errors.h
  22297. æT 
  22298. æD     nbpNotFound = -1028, /*Name not found on remove*/
  22299. æC 
  22300.  
  22301. æKY nbpNISErr
  22302. æFc Errors.h
  22303. æT 
  22304. æD     nbpNISErr = -1029, /*Error trying to open the NIS*/
  22305. æC 
  22306.  
  22307. æKY aspBadVersNum
  22308. æFc Errors.h
  22309. æT 
  22310. æD     aspBadVersNum = -1066, /*Server cannot support this ASP version*/
  22311. æC 
  22312.  
  22313. æKY aspBufTooSmall
  22314. æFc Errors.h
  22315. æT 
  22316. æD     aspBufTooSmall = -1067, /*Buffer too small*/
  22317. æC 
  22318.  
  22319. æKY aspNoMoreSess
  22320. æFc Errors.h
  22321. æT 
  22322. æD     aspNoMoreSess = -1068, /*No more sessions on server*/
  22323. æC 
  22324.  
  22325. æKY aspNoServers
  22326. æFc Errors.h
  22327. æT 
  22328. æD     aspNoServers = -1069, /*No servers at that address*/
  22329. æC 
  22330.  
  22331. æKY aspParamErr
  22332. æFc Errors.h
  22333. æT 
  22334. æD     aspParamErr = -1070, /*Parameter error*/
  22335. æC 
  22336.  
  22337. æKY aspServerBusy
  22338. æFc Errors.h
  22339. æT 
  22340. æD     aspServerBusy = -1071, /*Server cannot open another session*/
  22341. æC 
  22342.  
  22343. æKY aspSessClosed
  22344. æFc Errors.h
  22345. æT 
  22346. æD     aspSessClosed = -1072, /*Session closed*/
  22347. æC 
  22348.  
  22349. æKY aspSizeErr
  22350. æFc Errors.h
  22351. æT 
  22352. æD     aspSizeErr = -1073, /*Command block too big*/
  22353. æC 
  22354.  
  22355. æKY aspTooMany
  22356. æFc Errors.h
  22357. æT 
  22358. æD     aspTooMany = -1074, /*Too many clients (server error)*/
  22359. æC 
  22360.  
  22361. æKY aspNoAck
  22362. æFc Errors.h
  22363. æT 
  22364. æD     aspNoAck = -1075, /*No ack on attention request (server err)*/
  22365. æC 
  22366.  
  22367. æKY reqFailed
  22368. æFc Errors.h
  22369. æT 
  22370. æD     reqFailed = -1096,
  22371. æC 
  22372.  
  22373. æKY tooManyReqs
  22374. æFc Errors.h
  22375. æT 
  22376. æD     tooManyReqs = -1097,
  22377. æC 
  22378.  
  22379. æKY tooManySkts
  22380. æFc Errors.h
  22381. æT 
  22382. æD     tooManySkts = -1098,
  22383. æC 
  22384.  
  22385. æKY badATPSkt
  22386. æFc Errors.h
  22387. æT 
  22388. æD     badATPSkt = -1099,
  22389. æC 
  22390.  
  22391. æKY badBuffNum
  22392. æFc Errors.h
  22393. æT 
  22394. æD     badBuffNum = -1100,
  22395. æC 
  22396.  
  22397. æKY noRelErr
  22398. æFc Errors.h
  22399. æT 
  22400. æD     noRelErr = -1101,
  22401. æC 
  22402.  
  22403. æKY cbNotFound
  22404. æFc Errors.h
  22405. æT 
  22406. æD     cbNotFound = -1102,
  22407. æC 
  22408.  
  22409. æKY noSendResp
  22410. æFc Errors.h
  22411. æT 
  22412. æD     noSendResp = -1103,
  22413. æC 
  22414.  
  22415. æKY noDataArea
  22416. æFc Errors.h
  22417. æT 
  22418. æD     noDataArea = -1104,
  22419. æC 
  22420.  
  22421. æKY reqAborted
  22422. æFc Errors.h
  22423. æT 
  22424. æD     reqAborted = -1105,
  22425. æC 
  22426.  
  22427. æKY buf2SmallErr
  22428. æFc Errors.h
  22429. æT 
  22430. æD     buf2SmallErr = -3101,
  22431. æC 
  22432.  
  22433. æKY noMPPErr
  22434. æFc Errors.h
  22435. æT 
  22436. æD     noMPPErr = -3102,
  22437. æC 
  22438.  
  22439. æKY ckSumErr
  22440. æFc Errors.h
  22441. æT 
  22442. æD     ckSumErr = -3103,
  22443. æC 
  22444.  
  22445. æKY extractErr
  22446. æFc Errors.h
  22447. æT 
  22448. æD     extractErr = -3104,
  22449. æC 
  22450.  
  22451. æKY readQErr
  22452. æFc Errors.h
  22453. æT 
  22454. æD     readQErr = -3105,
  22455. æC 
  22456.  
  22457. æKY atpLenErr
  22458. æFc Errors.h
  22459. æT 
  22460. æD     atpLenErr = -3106,
  22461. æC 
  22462.  
  22463. æKY atpBadRsp
  22464. æFc Errors.h
  22465. æT 
  22466. æD     atpBadRsp = -3107,
  22467. æC 
  22468.  
  22469. æKY recNotFnd
  22470. æFc Errors.h
  22471. æT 
  22472. æD     recNotFnd = -3108,
  22473. æC 
  22474.  
  22475. æKY sktClosedErr
  22476. æFc Errors.h
  22477. æT 
  22478. æD     sktClosedErr = -3109,
  22479. æC 
  22480.  
  22481. æKY afpAccessDenied
  22482. æFc Errors.h
  22483. æT 
  22484. æD     afpAccessDenied = -5000,
  22485. æC 
  22486.  
  22487. æKY afpAuthContinue
  22488. æFc Errors.h
  22489. æT 
  22490. æD     afpAuthContinue = -5001,
  22491. æC 
  22492.  
  22493. æKY afpBadUAM
  22494. æFc Errors.h
  22495. æT 
  22496. æD     afpBadUAM = -5002,
  22497. æC 
  22498.  
  22499. æKY afpBadVersNum
  22500. æFc Errors.h
  22501. æT 
  22502. æD     afpBadVersNum = -5003,
  22503. æC 
  22504.  
  22505. æKY afpBitmapErr
  22506. æFc Errors.h
  22507. æT 
  22508. æD     afpBitmapErr = -5004,
  22509. æC 
  22510.  
  22511. æKY afpCantMove
  22512. æFc Errors.h
  22513. æT 
  22514. æD     afpCantMove = -5005,
  22515. æC 
  22516.  
  22517. æKY afpDenyConflict
  22518. æFc Errors.h
  22519. æT 
  22520. æD     afpDenyConflict = -5006,
  22521. æC 
  22522.  
  22523. æKY afpDirNotEmpty
  22524. æFc Errors.h
  22525. æT 
  22526. æD     afpDirNotEmpty = -5007,
  22527. æC 
  22528.  
  22529. æKY afpDiskFull
  22530. æFc Errors.h
  22531. æT 
  22532. æD     afpDiskFull = -5008,
  22533. æC 
  22534.  
  22535. æKY afpEofError
  22536. æFc Errors.h
  22537. æT 
  22538. æD     afpEofError = -5009,
  22539. æC 
  22540.  
  22541. æKY afpFileBusy
  22542. æFc Errors.h
  22543. æT 
  22544. æD     afpFileBusy = -5010,
  22545. æC 
  22546.  
  22547. æKY afpFlatVol
  22548. æFc Errors.h
  22549. æT 
  22550. æD     afpFlatVol = -5011,
  22551. æC 
  22552.  
  22553. æKY afpItemNotFound
  22554. æFc Errors.h
  22555. æT 
  22556. æD     afpItemNotFound = -5012,
  22557. æC 
  22558.  
  22559. æKY afpLockErr
  22560. æFc Errors.h
  22561. æT 
  22562. æD     afpLockErr = -5013,
  22563. æC 
  22564.  
  22565. æKY afpMiscErr
  22566. æFc Errors.h
  22567. æT 
  22568. æD     afpMiscErr = -5014,
  22569. æC 
  22570.  
  22571. æKY afpNoMoreLocks
  22572. æFc Errors.h
  22573. æT 
  22574. æD     afpNoMoreLocks = -5015,
  22575. æC 
  22576.  
  22577. æKY afpNoServer
  22578. æFc Errors.h
  22579. æT 
  22580. æD     afpNoServer = -5016,
  22581. æC 
  22582.  
  22583. æKY afpObjectExists
  22584. æFc Errors.h
  22585. æT 
  22586. æD     afpObjectExists = -5017,
  22587. æC 
  22588.  
  22589. æKY afpObjectNotFound
  22590. æFc Errors.h
  22591. æT 
  22592. æD     afpObjectNotFound = -5018,
  22593. æC 
  22594.  
  22595. æKY afpParmErr
  22596. æFc Errors.h
  22597. æT 
  22598. æD     afpParmErr = -5019,
  22599. æC 
  22600.  
  22601. æKY afpRangeNotLocked
  22602. æFc Errors.h
  22603. æT 
  22604. æD     afpRangeNotLocked = -5020,
  22605. æC 
  22606.  
  22607. æKY afpRangeOverlap
  22608. æFc Errors.h
  22609. æT 
  22610. æD     afpRangeOverlap = -5021,
  22611. æC 
  22612.  
  22613. æKY afpSessClosed
  22614. æFc Errors.h
  22615. æT 
  22616. æD     afpSessClosed = -5022,
  22617. æC 
  22618.  
  22619. æKY afpUserNotAuth
  22620. æFc Errors.h
  22621. æT 
  22622. æD     afpUserNotAuth = -5023,
  22623. æC 
  22624.  
  22625. æKY afpCallNotSupported
  22626. æFc Errors.h
  22627. æT 
  22628. æD     afpCallNotSupported = -5024,
  22629. æC 
  22630.  
  22631. æKY afpObjectTypeErr
  22632. æFc Errors.h
  22633. æT 
  22634. æD     afpObjectTypeErr = -5025,
  22635. æC 
  22636.  
  22637. æKY afpTooManyFilesOpen
  22638. æFc Errors.h
  22639. æT 
  22640. æD     afpTooManyFilesOpen = -5026,
  22641. æC 
  22642.  
  22643. æKY afpServerGoingDown
  22644. æFc Errors.h
  22645. æT 
  22646. æD     afpServerGoingDown = -5027,
  22647. æC 
  22648.  
  22649. æKY afpCantRename
  22650. æFc Errors.h
  22651. æT 
  22652. æD     afpCantRename = -5028,
  22653. æC 
  22654.  
  22655. æKY afpDirNotFound
  22656. æFc Errors.h
  22657. æT 
  22658. æD     afpDirNotFound = -5029,
  22659. æC 
  22660.  
  22661. æKY afpIconTypeError
  22662. æFc Errors.h
  22663. æT 
  22664. æD     afpIconTypeError = -5030,
  22665. æC 
  22666.  
  22667. æKY afpVolLocked
  22668. æFc Errors.h
  22669. æT 
  22670. æD     afpVolLocked = -5031, /*Volume is Read-Only*/
  22671. æC 
  22672.  
  22673. æKY afpObjectLocked
  22674. æFc Errors.h
  22675. æT 
  22676. æD     afpObjectLocked = -5032, /*Object is M/R/D/W inhibited*/
  22677. æC 
  22678.  
  22679. æKY afpContainsSharedErr
  22680. æFc Errors.h
  22681. æT 
  22682. æD     afpContainsSharedErr = -5033, /*$FFFFEC57   the folder being shared contains a shared folder */
  22683. æC 
  22684.  
  22685. æKY afpIDNotFound
  22686. æFc Errors.h
  22687. æT 
  22688. æD     afpIDNotFound = -5034, /*$FFFFEC56*/
  22689. æC 
  22690.  
  22691. æKY afpIDExists
  22692. æFc Errors.h
  22693. æT 
  22694. æD     afpIDExists = -5035, /*$FFFFEC55*/
  22695. æC 
  22696.  
  22697. æKY afpDiffVolErr
  22698. æFc Errors.h
  22699. æT 
  22700. æD     afpDiffVolErr = -5036, /*$FFFFEC54*/
  22701. æC 
  22702.  
  22703. æKY afpCatalogChanged
  22704. æFc Errors.h
  22705. æT 
  22706. æD     afpCatalogChanged = -5037, /*$FFFFEC53*/
  22707. æC 
  22708.  
  22709. æKY afpSameObjectErr
  22710. æFc Errors.h
  22711. æT 
  22712. æD     afpSameObjectErr = -5038, /*$FFFFEC52*/
  22713. æC 
  22714.  
  22715. æKY afpBadIDErr
  22716. æFc Errors.h
  22717. æT 
  22718. æD     afpBadIDErr = -5039, /*$FFFFEC51*/
  22719. æC 
  22720.  
  22721. æKY afpPwdSameErr
  22722. æFc Errors.h
  22723. æT 
  22724. æD     afpPwdSameErr = -5040, /*$FFFFEC50  someone tried to change their password to the same password on a mantadory password change */
  22725. æC 
  22726.  
  22727. æKY afpPwdTooShortErr
  22728. æFc Errors.h
  22729. æT 
  22730. æD     afpPwdTooShortErr = -5041, /*$FFFFEC4F  the password being set is too short: there is a minimum length that must be met or exceeded */
  22731. æC 
  22732.  
  22733. æKY afpPwdExpiredErr
  22734. æFc Errors.h
  22735. æT 
  22736. æD     afpPwdExpiredErr = -5042, /*$FFFFEC4E  the password being used is too old: this requires the user to change the password before log-in can continue */
  22737. æC 
  22738.  
  22739. æKY afpInsideSharedErr
  22740. æFc Errors.h
  22741. æT 
  22742. æD     afpInsideSharedErr = -5043, /*$FFFFEC4D  the folder being shared is inside a shared folder OR the folder contains a shared folder and is being moved into a shared folder OR the folder contains a shared folder and is being moved into the descendent of a shared folder. */
  22743. æC 
  22744.  
  22745. æKY afpInsideTrashErr
  22746. æFc Errors.h
  22747. æT 
  22748. æD     afpInsideTrashErr = -5044, /*$FFFFEC4C  the folder being shared is inside the trash folder OR the shared folder is being moved into the trash folder OR the folder is being moved to the trash and it contains a shared folder */
  22749. æC 
  22750.  
  22751. æKY notInitErr
  22752. æFc Errors.h
  22753. æT 
  22754. æD     notInitErr = -900, /* PPCToolBox not initialized */
  22755. æC 
  22756.  
  22757. æKY nameTypeErr
  22758. æFc Errors.h
  22759. æT 
  22760. æD     nameTypeErr = -902, /* Invalid or inappropriate locationKindSelector in locationName */
  22761. æC 
  22762.  
  22763. æKY noPortErr
  22764. æFc Errors.h
  22765. æT 
  22766. æD     noPortErr = -903, /* Unable to open port or bad portRefNum */
  22767. æC 
  22768.  
  22769. æKY noGlobalsErr
  22770. æFc Errors.h
  22771. æT 
  22772. æD     noGlobalsErr = -904, /* The system is hosed, better re-boot */
  22773. æC 
  22774.  
  22775. æKY localOnlyErr
  22776. æFc Errors.h
  22777. æT 
  22778. æD     localOnlyErr = -905, /* Network activity is currently disabled */
  22779. æC 
  22780.  
  22781. æKY destPortErr
  22782. æFc Errors.h
  22783. æT 
  22784. æD     destPortErr = -906, /* Port does not exist at destination */
  22785. æC 
  22786.  
  22787. æKY sessTableErr
  22788. æFc Errors.h
  22789. æT 
  22790. æD     sessTableErr = -907, /* Out of session tables, try again later */
  22791. æC 
  22792.  
  22793. æKY noSessionErr
  22794. æFc Errors.h
  22795. æT 
  22796. æD     noSessionErr = -908, /* Invalid session reference number */
  22797. æC 
  22798.  
  22799. æKY badReqErr
  22800. æFc Errors.h
  22801. æT 
  22802. æD     badReqErr = -909, /* bad parameter or invalid state for operation */
  22803. æC 
  22804.  
  22805. æKY portNameExistsErr
  22806. æFc Errors.h
  22807. æT 
  22808. æD     portNameExistsErr = -910, /* port is already open (perhaps in another app) */
  22809. æC 
  22810.  
  22811. æKY noUserNameErr
  22812. æFc Errors.h
  22813. æT 
  22814. æD     noUserNameErr = -911, /* user name unknown on destination machine */
  22815. æC 
  22816.  
  22817. æKY userRejectErr
  22818. æFc Errors.h
  22819. æT 
  22820. æD     userRejectErr = -912, /* Destination rejected the session request */
  22821. æC 
  22822.  
  22823. æKY noMachineNameErr
  22824. æFc Errors.h
  22825. æT 
  22826. æD     noMachineNameErr = -913, /* user hasn't named his Macintosh in the Network Setup Control Panel */
  22827. æC 
  22828.  
  22829. æKY noToolboxNameErr
  22830. æFc Errors.h
  22831. æT 
  22832. æD     noToolboxNameErr = -914, /* A system resource is missing, not too likely */
  22833. æC 
  22834.  
  22835. æKY noResponseErr
  22836. æFc Errors.h
  22837. æT 
  22838. æD     noResponseErr = -915, /* unable to contact destination */
  22839. æC 
  22840.  
  22841. æKY portClosedErr
  22842. æFc Errors.h
  22843. æT 
  22844. æD     portClosedErr = -916, /* port was closed */
  22845. æC 
  22846.  
  22847. æKY sessClosedErr
  22848. æFc Errors.h
  22849. æT 
  22850. æD     sessClosedErr = -917, /* session was closed */
  22851. æC 
  22852.  
  22853. æKY badPortNameErr
  22854. æFc Errors.h
  22855. æT 
  22856. æD     badPortNameErr = -919, /* PPCPortRec malformed */
  22857. æC 
  22858.  
  22859. æKY noDefaultUserErr
  22860. æFc Errors.h
  22861. æT 
  22862. æD     noDefaultUserErr = -922, /* user hasn't typed in owners name in Network Setup Control Pannel */
  22863. æC 
  22864.  
  22865. æKY notLoggedInErr
  22866. æFc Errors.h
  22867. æT 
  22868. æD     notLoggedInErr = -923, /* The default userRefNum does not yet exist */
  22869. æC 
  22870.  
  22871. æKY noUserRefErr
  22872. æFc Errors.h
  22873. æT 
  22874. æD     noUserRefErr = -924, /* unable to create a new userRefNum */
  22875. æC 
  22876.  
  22877. æKY networkErr
  22878. æFc Errors.h
  22879. æT 
  22880. æD     networkErr = -925, /* An error has occured in the network, not too likely */
  22881. æC 
  22882.  
  22883. æKY noInformErr
  22884. æFc Errors.h
  22885. æT 
  22886. æD     noInformErr = -926, /* PPCStart failed because destination did not have inform pending */
  22887. æC 
  22888.  
  22889. æKY authFailErr
  22890. æFc Errors.h
  22891. æT 
  22892. æD     authFailErr = -927, /* unable to authenticate user at destination */
  22893. æC 
  22894.  
  22895. æKY noUserRecErr
  22896. æFc Errors.h
  22897. æT 
  22898. æD     noUserRecErr = -928, /* Invalid user reference number */
  22899. æC 
  22900.  
  22901. æKY badServiceMethodErr
  22902. æFc Errors.h
  22903. æT 
  22904. æD     badServiceMethodErr = -930, /* illegal service type, or not supported */
  22905. æC 
  22906.  
  22907. æKY badLocNameErr
  22908. æFc Errors.h
  22909. æT 
  22910. æD     badLocNameErr = -931, /* location name malformed */
  22911. æC 
  22912.  
  22913. æKY guestNotAllowedErr
  22914. æFc Errors.h
  22915. æT 
  22916. æD     guestNotAllowedErr = -932, /* destination port requires authentication */
  22917. æC 
  22918.  
  22919. æKY swOverrunErr
  22920. æFc Errors.h
  22921. æT 
  22922. æD     swOverrunErr = 1, /*serial driver error masks*/
  22923. æC 
  22924.  
  22925. æKY parityErr
  22926. æFc Errors.h
  22927. æT 
  22928. æD     parityErr = 16, /*serial driver error masks*/
  22929. æC 
  22930.  
  22931. æKY hwOverrunErr
  22932. æFc Errors.h
  22933. æT 
  22934. æD     hwOverrunErr = 32, /*serial driver error masks*/
  22935. æC 
  22936.  
  22937. æKY framingErr
  22938. æFc Errors.h
  22939. æT 
  22940. æD     framingErr = 64, /*serial driver error masks*/
  22941. æC 
  22942.  
  22943. æKY dsBusError
  22944. æFc Errors.h
  22945. æT 
  22946. æD     dsBusError = 1, /*bus error */
  22947. æC 
  22948.  
  22949. æKY dsAddressErr
  22950. æFc Errors.h
  22951. æT 
  22952. æD     dsAddressErr = 2, /*address error*/
  22953. æC 
  22954.  
  22955. æKY dsIllInstErr
  22956. æFc Errors.h
  22957. æT 
  22958. æD     dsIllInstErr = 3, /*illegal instruction error*/
  22959. æC 
  22960.  
  22961. æKY dsZeroDivErr
  22962. æFc Errors.h
  22963. æT 
  22964. æD     dsZeroDivErr = 4, /*zero divide error*/
  22965. æC 
  22966.  
  22967. æKY dsChkErr
  22968. æFc Errors.h
  22969. æT 
  22970. æD     dsChkErr = 5, /*check trap error*/
  22971. æC 
  22972.  
  22973. æKY dsOvflowErr
  22974. æFc Errors.h
  22975. æT 
  22976. æD     dsOvflowErr = 6, /*overflow trap error*/
  22977. æC 
  22978.  
  22979. æKY dsPrivErr
  22980. æFc Errors.h
  22981. æT 
  22982. æD     dsPrivErr = 7, /*privilege violation error*/
  22983. æC 
  22984.  
  22985. æKY dsTraceErr
  22986. æFc Errors.h
  22987. æT 
  22988. æD     dsTraceErr = 8, /*trace mode error*/
  22989. æC 
  22990.  
  22991. æKY dsLineAErr
  22992. æFc Errors.h
  22993. æT 
  22994. æD     dsLineAErr = 9, /*line 1010 trap error*/
  22995. æC 
  22996.  
  22997. æKY dsLineFErr
  22998. æFc Errors.h
  22999. æT 
  23000. æD     dsLineFErr = 10, /*line 1111 trap error*/
  23001. æC 
  23002.  
  23003. æKY dsMiscErr
  23004. æFc Errors.h
  23005. æT 
  23006. æD     dsMiscErr = 11, /*miscellaneous hardware exception error*/
  23007. æC 
  23008.  
  23009. æKY dsCoreErr
  23010. æFc Errors.h
  23011. æT 
  23012. æD     dsCoreErr = 12, /*unimplemented core routine error*/
  23013. æC 
  23014.  
  23015. æKY dsIrqErr
  23016. æFc Errors.h
  23017. æT 
  23018. æD     dsIrqErr = 13, /*uninstalled interrupt error*/
  23019. æC 
  23020.  
  23021. æKY dsIOCoreErr
  23022. æFc Errors.h
  23023. æT 
  23024. æD     dsIOCoreErr = 14, /*IO Core Error*/
  23025. æC 
  23026.  
  23027. æKY dsLoadErr
  23028. æFc Errors.h
  23029. æT 
  23030. æD     dsLoadErr = 15, /*Segment Loader Error*/
  23031. æC 
  23032.  
  23033. æKY dsFPErr
  23034. æFc Errors.h
  23035. æT 
  23036. æD     dsFPErr = 16, /*Floating point error*/
  23037. æC 
  23038.  
  23039. æKY dsNoPackErr
  23040. æFc Errors.h
  23041. æT 
  23042. æD     dsNoPackErr = 17, /*package 0 not present*/
  23043. æC 
  23044.  
  23045. æKY dsNoPk1
  23046. æFc Errors.h
  23047. æT 
  23048. æD     dsNoPk1 = 18, /*package 1 not present*/
  23049. æC 
  23050.  
  23051. æKY dsNoPk2
  23052. æFc Errors.h
  23053. æT 
  23054. æD     dsNoPk2 = 19, /*package 2 not present*/
  23055. æC 
  23056.  
  23057. æKY dsNoPk3
  23058. æFc Errors.h
  23059. æT 
  23060. æD     dsNoPk3 = 20, /*package 3 not present*/
  23061. æC 
  23062.  
  23063. æKY dsNoPk4
  23064. æFc Errors.h
  23065. æT 
  23066. æD     dsNoPk4 = 21, /*package 4 not present*/
  23067. æC 
  23068.  
  23069. æKY dsNoPk5
  23070. æFc Errors.h
  23071. æT 
  23072. æD     dsNoPk5 = 22, /*package 5 not present*/
  23073. æC 
  23074.  
  23075. æKY dsNoPk6
  23076. æFc Errors.h
  23077. æT 
  23078. æD     dsNoPk6 = 23, /*package 6 not present*/
  23079. æC 
  23080.  
  23081. æKY dsNoPk7
  23082. æFc Errors.h
  23083. æT 
  23084. æD     dsNoPk7 = 24, /*package 7 not present*/
  23085. æC 
  23086.  
  23087. æKY dsMemFullErr
  23088. æFc Errors.h
  23089. æT 
  23090. æD     dsMemFullErr = 25, /*out of memory!*/
  23091. æC 
  23092.  
  23093. æKY dsBadLaunch
  23094. æFc Errors.h
  23095. æT 
  23096. æD     dsBadLaunch = 26, /*can't launch file*/
  23097. æC 
  23098.  
  23099. æKY dsFSErr
  23100. æFc Errors.h
  23101. æT 
  23102. æD     dsFSErr = 27, /*file system map has been trashed*/
  23103. æC 
  23104.  
  23105. æKY dsStknHeap
  23106. æFc Errors.h
  23107. æT 
  23108. æD     dsStknHeap = 28, /*stack has moved into application heap*/
  23109. æC 
  23110.  
  23111. æKY negZcbFreeErr
  23112. æFc Errors.h
  23113. æT 
  23114. æD     negZcbFreeErr = 33, /*ZcbFree has gone negative*/
  23115. æC 
  23116.  
  23117. æKY dsFinderErr
  23118. æFc Errors.h
  23119. æT 
  23120. æD     dsFinderErr = 41, /*can't load the Finder error*/
  23121. æC 
  23122.  
  23123. æKY dsBadSlotInt
  23124. æFc Errors.h
  23125. æT 
  23126. æD     dsBadSlotInt = 51, /*unserviceable slot interrupt*/
  23127. æC 
  23128.  
  23129. æKY dsBadSANEOpcode
  23130. æFc Errors.h
  23131. æT 
  23132. æD     dsBadSANEOpcode = 81, /*bad opcode given to SANE Pack4*/
  23133. æC 
  23134.  
  23135. æKY dsBadPatchHeader
  23136. æFc Errors.h
  23137. æT 
  23138. æD     dsBadPatchHeader = 83, /*SetTrapAddress saw the “come-from” header*/
  23139. æC 
  23140.  
  23141. æKY menuPrgErr
  23142. æFc Errors.h
  23143. æT 
  23144. æD     menuPrgErr = 84, /*happens when a menu is purged*/
  23145. æC 
  23146.  
  23147. æKY dsMBarNFnd
  23148. æFc Errors.h
  23149. æT 
  23150. æD     dsMBarNFnd = 85, /*Menu Manager Errors*/
  23151. æC 
  23152.  
  23153. æKY dsHMenuFindErr
  23154. æFc Errors.h
  23155. æT 
  23156. æD     dsHMenuFindErr = 86, /*Menu Manager Errors*/
  23157. æC 
  23158.  
  23159. æKY dsWDEFNotFound
  23160. æFc Errors.h
  23161. æT 
  23162. æD     dsWDEFNotFound = 87, /*could not load WDEF*/
  23163. æC 
  23164.  
  23165. æKY dsCDEFNotFound
  23166. æFc Errors.h
  23167. æT 
  23168. æD     dsCDEFNotFound = 88, /*could not load CDEF*/
  23169. æC 
  23170.  
  23171. æKY dsMDEFNotFound
  23172. æFc Errors.h
  23173. æT 
  23174. æD     dsMDEFNotFound = 89, /*could not load MDEF*/
  23175. æC 
  23176.  
  23177. æKY dsNoFPU
  23178. æFc Errors.h
  23179. æT 
  23180. æD     dsNoFPU = 90, /*an FPU instruction was executed and the machine doesn’t have one*/
  23181. æC 
  23182.  
  23183. æKY dsNoPatch
  23184. æFc Errors.h
  23185. æT 
  23186. æD     dsNoPatch = 98, /*Can't patch for particular Model Mac*/
  23187. æC 
  23188.  
  23189. æKY dsBadPatch
  23190. æFc Errors.h
  23191. æT 
  23192. æD     dsBadPatch = 99, /*Can't load patch resource*/
  23193. æC 
  23194.  
  23195. æKY dsParityErr
  23196. æFc Errors.h
  23197. æT 
  23198. æD     dsParityErr = 101, /*memory parity error*/
  23199. æC 
  23200.  
  23201. æKY dsOldSystem
  23202. æFc Errors.h
  23203. æT 
  23204. æD     dsOldSystem = 102, /*System is too old for this ROM*/
  23205. æC 
  23206.  
  23207. æKY ds32BitMode
  23208. æFc Errors.h
  23209. æT 
  23210. æD     ds32BitMode = 103, /*booting in 32-bit on a 24-bit sys*/
  23211. æC 
  23212.  
  23213. æKY dsNeedToWriteBootBlocks
  23214. æFc Errors.h
  23215. æT 
  23216. æD     dsNeedToWriteBootBlocks = 104, /*need to write new boot blocks*/
  23217. æC 
  23218.  
  23219. æKY dsNotEnoughRAMToBoot
  23220. æFc Errors.h
  23221. æT 
  23222. æD     dsNotEnoughRAMToBoot = 105, /*must have at least 1.5MB of RAM to boot 7.0*/
  23223. æC 
  23224.  
  23225. æKY dsBufPtrTooLow
  23226. æFc Errors.h
  23227. æT 
  23228. æD     dsBufPtrTooLow = 106, /*bufPtr moved too far during boot*/
  23229. æC 
  23230.  
  23231. æKY dsReinsert
  23232. æFc Errors.h
  23233. æT 
  23234. æD     dsReinsert = 30, /*request user to reinsert off-line volume*/
  23235. æC 
  23236.  
  23237. æKY shutDownAlert
  23238. æFc Errors.h
  23239. æT 
  23240. æD     shutDownAlert = 42, /*handled like a shutdown error*/
  23241. æC 
  23242.  
  23243. æKY dsShutDownOrRestart
  23244. æFc Errors.h
  23245. æT 
  23246. æD     dsShutDownOrRestart = 20000, /*user choice between ShutDown and Restart*/
  23247. æC 
  23248.  
  23249. æKY dsSwitchOffOrRestart
  23250. æFc Errors.h
  23251. æT 
  23252. æD     dsSwitchOffOrRestart = 20001, /*user choice between switching off and Restart*/
  23253. æC 
  23254.  
  23255. æKY dsForcedQuit
  23256. æFc Errors.h
  23257. æT 
  23258. æD     dsForcedQuit = 20002, /*allow the user to ExitToShell, return if Cancel*/
  23259. æC 
  23260.  
  23261. æKY dsMacsBugInstalled
  23262. æFc Errors.h
  23263. æT 
  23264. æD     dsMacsBugInstalled = -10, /*say “MacsBug Installed”*/
  23265. æC 
  23266.  
  23267. æKY dsDisassemblerInstalled
  23268. æFc Errors.h
  23269. æT 
  23270. æD     dsDisassemblerInstalled = -11, /*say “Disassembler Installed”*/
  23271. æC 
  23272.  
  23273. æKY dsExtensionsDisabled
  23274. æFc Errors.h
  23275. æT 
  23276. æD     dsExtensionsDisabled = -13, /*say “Extensions Disabled”*/
  23277. æC 
  23278.  
  23279. æKY dsGreeting
  23280. æFc Errors.h
  23281. æT 
  23282. æD     dsGreeting = 40, /*welcome to Macintosh greeting*/
  23283. æC 
  23284.  
  23285. æKY dsSysErr
  23286. æFc Errors.h
  23287. æT 
  23288. æD     dsSysErr = 32767, /*general system error*/
  23289. æC 
  23290.  
  23291. æKY WDEFNFnd
  23292. æFc Errors.h
  23293. æT 
  23294. æD     WDEFNFnd = dsWDEFNotFound,
  23295. æC 
  23296.  
  23297. æKY CDEFNFnd
  23298. æFc Errors.h
  23299. æT 
  23300. æD     CDEFNFnd = dsCDEFNotFound,
  23301. æC 
  23302.  
  23303. æKY dsNotThe1
  23304. æFc Errors.h
  23305. æT 
  23306. æD     dsNotThe1 = 31, /*not the disk I wanted*/
  23307. æC 
  23308.  
  23309. æKY dsBadStartupDisk
  23310. æFc Errors.h
  23311. æT 
  23312. æD     dsBadStartupDisk = 42, /*unable to mount boot volume (sad Mac only)*/
  23313. æC 
  23314.  
  23315. æKY dsSystemFileErr
  23316. æFc Errors.h
  23317. æT 
  23318. æD     dsSystemFileErr = 43, /*can’t find System file to open (sad Mac only)*/
  23319. æC 
  23320.  
  23321. æKY dsHD20Installed
  23322. æFc Errors.h
  23323. æT 
  23324. æD     dsHD20Installed = -12, /*say “HD20 Startup”*/
  23325. æC 
  23326.  
  23327. æKY mBarNFnd
  23328. æFc Errors.h
  23329. æT 
  23330. æD     mBarNFnd = -126, /*system error code for MBDF not found*/
  23331. æC 
  23332.  
  23333. æKY hMenuFindErr
  23334. æFc Errors.h
  23335. æT 
  23336. æD     hMenuFindErr = -127, /*could not find HMenu's parent in MenuKey*/
  23337. æC 
  23338.  
  23339. æKY userBreak
  23340. æFc Errors.h
  23341. æT 
  23342. æD     userBreak = -490, /*user debugger break*/
  23343. æC 
  23344.  
  23345. æKY strUserBreak
  23346. æFc Errors.h
  23347. æT 
  23348. æD     strUserBreak = -491, /*user debugger break; display string on stack*/
  23349. æC 
  23350.  
  23351. æKY exUserBreak
  23352. æFc Errors.h
  23353. æT 
  23354. æD     exUserBreak = -492, /*user debugger break; execute debugger commands on stack*/
  23355. æC 
  23356.  
  23357. æKY selectorErr
  23358. æFc Errors.h
  23359. æT 
  23360. æD     selectorErr = paramErr,            /* bad selector, for selector-based traps */
  23361. æC 
  23362.  
  23363. æKY MacOSErr
  23364. æFc Errors.h
  23365. æT typedef
  23366. æD extern short MacOSErr;
  23367. æC 
  23368.  
  23369. æKY SysError
  23370. æFc Errors.h
  23371. æT Function
  23372. æD pascal void SysError(short errorCode)
  23373.     = {0x301F,0xA9C9}; 
  23374. æDT SysError((short) errorCode);
  23375. æMM
  23376. æRI II-362, V-572
  23377. æC _____________________________________________________________________________________
  23378.  
  23379. Trap macro  _SysError
  23380. On entry    D0:  errorCode (word)
  23381. On exit     All registers changed
  23382. _____________________________________________________________________________________
  23383. SysError generates a system error with the ID specified by the errorCode 
  23384. parameter.
  23385.  
  23386. It takes the following precise steps:
  23387. 1.  It saves all registers and the stack pointer.
  23388. 2.  It stores the system error ID in a global variable (named DSErrCode).
  23389. 3.  It checks to see whether there's a system error alert table in memory (by 
  23390.     testing whether the global variable DSAlertTab is 0); if there isn't, it draws 
  23391.     the "sad Macintosh" icon.
  23392. 4.  It allocates memory for QuickDraw globals on the stack, initializes 
  23393.     QuickDraw, and initializes a grafPort in which the alert box will be drawn.
  23394. 5.  It checks the system error ID.  If the system error ID is negative, the alert 
  23395.     box isn't redrawn (this is used for system startup alerts, which can display a 
  23396.     sequence of consecutive messages in the same box).  If the system error ID 
  23397.     doesn't correspond to an entry in the system error alert table, the default 
  23398.     alert definition at the start of the table will be used, displaying the message 
  23399.     "Sorry, a system error occurred".
  23400. 6.  It draws an alert box (in the rectangle specified by the global variable 
  23401.     DSAlertRect).
  23402. 7.  If the text definition IDs in the alert definition for this alert aren't 0, it 
  23403.     draws both strings.
  23404. 8.  If the icon definition ID in the alert definition isn't 0, it draws the icon.
  23405. 9.  If the procedure definition ID in the alert definition isn't 0, it invokes the 
  23406.     procedure with the specified ID.
  23407. 10. If the button definition ID in the alert definition is 0, it returns control to 
  23408.     the procedure that called it (this is used during the disk-switch alert to return
  23409.     control to the File Manager after the "Please insert the disk:" message has been 
  23410.     displayed).
  23411. 11. If there's a resume procedure, it increments the button definition ID by 1.
  23412. 12. It draws the buttons.
  23413. 13. It hit-tests the buttons and calls the corresponding procedure code when a 
  23414.     button is pressed.  If there's no procedure code, it returns to the procedure 
  23415.     that called it.
  23416.  
  23417. User Alerts
  23418. _____________
  23419. ID  Explanation
  23420. 1   Bus error:  Invalid memory reference; happens only on a Macintosh XL 
  23421. 2   Address error:  Word or long-word reference made to an odd address
  23422. 3   Illegal instruction:  The MC68000 received an instruction it didn't recognize.
  23423. 4   Zero divide:  Signed Divide (DIVS) or Unsigned Divide (DIVU) instruction 
  23424.                   with a divisor of 0 was executed.
  23425. 5   Check exception:  Check Register Against Bounds (CHK) instruction was executed 
  23426.                       and failed.  Pascal "value out of range" errors are usually 
  23427.                       reported in this way.
  23428. 6   TrapV exception:  Trap On Overflow (TRAPV) instruction was executed and failed.
  23429. 7   Privilege violation:  Macintosh always runs in supervisor mode; perhaps an 
  23430.                           erroneous Return From Execution (RTE) instruction was 
  23431.                           executed.
  23432. 8   Trace exception:  The trace bit in the status register is set.
  23433. 9   Line 1010 exception:  The 1010 trap dispatcher has failed.
  23434. 10  Line 1111 exception:  Unimplemented instruction
  23435. 11  Miscellaneous exception:  All other MC68000 exceptions
  23436. 12  Unimplemented core routine:  An unimplemented trap number was encountered.
  23437. 13  Spurious interrupt:  The interrupt vector table entry for a particular level 
  23438.                          of interrupt is NIL; usually occurs with level 4, 5, 6, or 7 
  23439.                          interrupts.
  23440. 14  I/O system error:  The File Manager is attempting to dequeue an entry from 
  23441.                        an I/O request queue that has a bad queue type field; perhaps 
  23442.                        the queue entry is unlocked.  Or, the dCtlQHead field was NIL 
  23443.                        during a Fetch or Stash call.  Or, a needed device control 
  23444.                        entry has been purged.
  23445. 15  Segment Loader error:  A GetResource call to read a segment into memory failed.
  23446. 16  Floating point error:  The halt bit in the floating-point environment word was 
  23447.                            set.
  23448. 17-24 Can't load package:  A GetResource call to read a package into memory failed.
  23449. 25  Can't allocate requested memory block in the heap
  23450. 26  Segment Loader error:  A GetResource call to read 'CODE' resource 0 into 
  23451.                            memory failed; usually indicates a nonexecutable file.
  23452. 27  File map destroyed:  A logical block number was found that's greater than 
  23453.                          the number of the last logical block on the volume or less 
  23454.                          than the logical block number of the first allocation block 
  23455.                          on the volume.
  23456. 28  Stack overflow error:  The stack has expanded into the heap.
  23457. 30  "Please insert the disk:" File Manager alert
  23458. 41  The file named "Finder" can't be found on the disk.
  23459. 100 Can't mount system startup volume.  The system couldn't read the system resource 
  23460.                                         file into memory.
  23461. 32767 "Sorry, a system error occurred":  Default alert message 
  23462.  
  23463.  
  23464. æKY Events.h
  23465. æKL Button
  23466. EventAvail
  23467. GetCaretTime
  23468. GetDblTime
  23469. GetKeys
  23470. GetMouse
  23471. GetNextEvent
  23472. StillDown
  23473. TickCount
  23474. WaitMouseUp
  23475. WaitNextEvent
  23476.  
  23477. activateEvt
  23478. activeFlag
  23479. activMask
  23480. adbAddrMask
  23481. alphaLock
  23482. app1Evt
  23483. app1Mask
  23484. app2Evt
  23485. app2Mask
  23486. app3Evt
  23487. app3Mask
  23488. app4Evt
  23489. app4Mask
  23490. autoKey
  23491. autoKeyMask
  23492. btnState
  23493. charCodeMask
  23494. cmdKey
  23495. controlKey
  23496. convertClipboardFlag
  23497. diskEvt
  23498. diskMask
  23499. driverEvt
  23500. driverMask
  23501. EventRecord
  23502. everyEvent
  23503. highLevelEventMask
  23504. keyCodeMask
  23505. keyDown
  23506. keyDownMask
  23507. KeyMap
  23508. keyUp
  23509. keyUpMask
  23510. mDownMask
  23511. mouseDown
  23512. mouseMovedMessage
  23513. mouseUp
  23514. mUpMask
  23515. networkEvt
  23516. networkMask
  23517. nullEvent
  23518. optionKey
  23519. osEvt
  23520. osEvtMessageMask
  23521. osMask
  23522. resumeFlag
  23523. shiftKey
  23524. suspendResumeMessage
  23525. updateEvt
  23526. updateMask
  23527.  
  23528. æKY nullEvent
  23529. æFc Events.h
  23530. æT 
  23531. æD     nullEvent = 0,
  23532. æC 
  23533. »Event Code
  23534.  
  23535. The what field of an event record contains an event code identifying the type of the
  23536. event. The event codes are available as predefined constants:
  23537.  
  23538. #define nullEvent     0    /*null*/
  23539. #define mouseDown     1    /*mouse-down*/
  23540. #define mouseUp       2    /*mouse-up*/
  23541. #define keyDown       4    /*key-down*/
  23542. #define keyUp         3    /*key-up*/
  23543. #define autoKey       5    /*auto-key*/
  23544. #define updateEvt     6    /*update*/
  23545. #define diskEvt       7    /*disk-inserted*/
  23546. #define activateEvt   8    /*activate*/
  23547. #define networkEvt   10    /*network*/
  23548. #define driverEvt    11    /*device driver*/
  23549. #define app1Evt      12    /*application-defined*/
  23550. #define app2Evt      13    /*application-defined*/
  23551. #define app3Evt      14    /*application-defined*/
  23552. #define app4Evt      15    /*application-defined*/
  23553.  
  23554. æKY mouseDown
  23555. æFc Events.h
  23556. æT 
  23557. æD     mouseDown = 1,
  23558. æC 
  23559.  
  23560. æKY mouseUp
  23561. æFc Events.h
  23562. æT 
  23563. æD     mouseUp = 2,
  23564. æC 
  23565.  
  23566. æKY keyDown
  23567. æFc Events.h
  23568. æT 
  23569. æD     keyDown = 3,
  23570. æC 
  23571.  
  23572. æKY keyUp
  23573. æFc Events.h
  23574. æT 
  23575. æD     keyUp = 4,
  23576. æC 
  23577.  
  23578. æKY autoKey
  23579. æFc Events.h
  23580. æT 
  23581. æD     autoKey = 5,
  23582. æC 
  23583.  
  23584. æKY updateEvt
  23585. æFc Events.h
  23586. æT 
  23587. æD     updateEvt = 6,
  23588. æC 
  23589.  
  23590. æKY diskEvt
  23591. æFc Events.h
  23592. æT 
  23593. æD     diskEvt = 7,
  23594. æC 
  23595.  
  23596. æKY activateEvt
  23597. æFc Events.h
  23598. æT 
  23599. æD     activateEvt = 8,
  23600. æC 
  23601.  
  23602. æKY osEvt
  23603. æFc Events.h
  23604. æT 
  23605. æD     osEvt = 15,
  23606. æC 
  23607.  
  23608. æKY mDownMask
  23609. æFc Events.h
  23610. æT 
  23611. æD     mDownMask = 2,
  23612. æC 
  23613. _______________________________________________________________________________
  23614.  
  23615. »EVENT MASKS
  23616. _______________________________________________________________________________
  23617.  
  23618. Some of the Event Manager routines can be restricted to operate on a specific event
  23619. type or group of types; in other words, the specified event types are enabled while
  23620. all others are disabled. For instance, instead of just requesting the next available
  23621. event, you can specifically ask for the next keyboard event.
  23622.  
  23623. You specify which event types a particular Event Manager call applies to by supplying
  23624. an event mask as a parameter. This is an integer in which there’s one bit position
  23625. for each event type, as shown in Figure 8. The bit position representing a given type
  23626. corresponds to the event code for that type—for example, update events (event code 6)
  23627. are specified by bit 6 of the mask. A 1 in bit 6 means that this Event Manager call
  23628. applies to update events; a 0 means that it doesn’t.
  23629.  
  23630. •••Refer to Figure 8.•••
  23631.  
  23632. Figure 8–Event Mask
  23633.  
  23634. Masks for each individual event type are available as predefined constants:
  23635.  
  23636. #define mDownMask    2       /*mouse-down*/
  23637. #define mUpMask      4       /*mouse-up*/
  23638. #define keyDownMask  8       /*key-down*/
  23639. #define keyUpMask    16      /*key-up*/
  23640. #define autoKeyMask  32      /*auto-key*/
  23641. #define updateMask   64      /*update*/
  23642. #define diskMask     128     /*disk-inserted*/
  23643. #define activMask    256     /*activate*/
  23644. #define networkMask  1024    /*network*/
  23645. #define driverMask   2048    /*device driver*/
  23646. #define app1Mask     4096    /*application-defined*/
  23647. #define app2Mask     8192    /*application-defined*/
  23648. #define app3Mask     16384   /*application-defined*/
  23649. #define app4Mask     -32768  /*application-defined*/
  23650.  
  23651. Note:  Null events can’t be disabled; a null event will always be reported
  23652.        when none of the enabled types of events are available.
  23653.  
  23654. The following predefined mask designates all event types:
  23655.  
  23656. CONST    everyEvent    = -1;    {all event types}
  23657.  
  23658. You can form any mask you need by adding or subtracting these mask constants. For
  23659. example, to specify every keyboard event, use
  23660.  
  23661.   keyDownMask + keyUpMask + autoKeyMask
  23662.  
  23663. For every event except an update, use
  23664.  
  23665.   everyEvent - updateMask
  23666.  
  23667. Note:  It’s recommended that you always use the event mask everyEvent unless
  23668.        there’s a specific reason not to.
  23669.  
  23670. There’s also a global system event mask that controls which event types get posted
  23671. into the event queue. Only event types corresponding to bits set in the system event
  23672. mask are posted; all others are ignored. When the system starts up, the system event
  23673. mask is set to post all except key-up event—that is, it’s initialized to
  23674.  
  23675.   everyEvent - keyUpMask
  23676.  
  23677. Note:  Key-up events are meaningless for most applications. Your application
  23678.        will usually want to ignore them; if not, it can set the system event
  23679.        mask with the Operating System Event Manager procedure SetEventMask.
  23680.  
  23681. æKY mUpMask
  23682. æFc Events.h
  23683. æT 
  23684. æD     mUpMask = 4,
  23685. æC 
  23686.  
  23687. æKY keyDownMask
  23688. æFc Events.h
  23689. æT 
  23690. æD     keyDownMask = 8,
  23691. æC 
  23692.  
  23693. æKY keyUpMask
  23694. æFc Events.h
  23695. æT 
  23696. æD     keyUpMask = 16,
  23697. æC 
  23698.  
  23699. æKY autoKeyMask
  23700. æFc Events.h
  23701. æT 
  23702. æD     autoKeyMask = 32,
  23703. æC 
  23704.  
  23705. æKY updateMask
  23706. æFc Events.h
  23707. æT 
  23708. æD     updateMask = 64,
  23709. æC 
  23710.  
  23711. æKY diskMask
  23712. æFc Events.h
  23713. æT 
  23714. æD     diskMask = 128,
  23715. æC 
  23716.  
  23717. æKY activMask
  23718. æFc Events.h
  23719. æT 
  23720. æD     activMask = 256,
  23721. æC 
  23722.  
  23723. æKY highLevelEventMask
  23724. æFc Events.h
  23725. æT 
  23726. æD     highLevelEventMask = 1024,
  23727. æC 
  23728.  
  23729. æKY osMask
  23730. æFc Events.h
  23731. æT 
  23732. æD     osMask = -32768,
  23733. æC 
  23734.  
  23735. æKY everyEvent
  23736. æFc Events.h
  23737. æT 
  23738. æD     everyEvent = -1,
  23739. æC 
  23740.  
  23741. æKY charCodeMask
  23742. æFc Events.h
  23743. æT 
  23744. æD     charCodeMask = 0x000000FF,
  23745. æC 
  23746.  
  23747. æKY keyCodeMask
  23748. æFc Events.h
  23749. æT 
  23750. æD     keyCodeMask = 0x0000FF00,
  23751. æC 
  23752.  
  23753. æKY adbAddrMask
  23754. æFc Events.h
  23755. æT 
  23756. æD     adbAddrMask = 0x00FF0000,
  23757. æC 
  23758.  
  23759. æKY osEvtMessageMask
  23760. æFc Events.h
  23761. æT 
  23762. æD     osEvtMessageMask = 0xFF000000,
  23763. æC 
  23764.  
  23765. æKY mouseMovedMessage
  23766. æFc Events.h
  23767. æT 
  23768. æD     mouseMovedMessage = 0xFA,
  23769. æC 
  23770.  
  23771. æKY suspendResumeMessage
  23772. æFc Events.h
  23773. æT 
  23774. æD     suspendResumeMessage = 0x01,
  23775. æC 
  23776.  
  23777. æKY resumeFlag
  23778. æFc Events.h
  23779. æT 
  23780. æD     resumeFlag = 1, /* bit 0 of message indicates resume vs suspend */
  23781. æC 
  23782.  
  23783. æKY convertClipboardFlag
  23784. æFc Events.h
  23785. æT 
  23786. æD     convertClipboardFlag = 2, /* bit 1 in resume message indicates clipboard change */
  23787. æC 
  23788.  
  23789. æKY activeFlag
  23790. æFc Events.h
  23791. æT 
  23792. æD     activeFlag = 1, /*bit 0 of modifiers for activate event*/
  23793. æC 
  23794. »Modifier Flags
  23795.  
  23796. As mentioned above, the modifiers field of an event record contains further information
  23797. about activate events and the state of the modifier keys and mouse button at the time
  23798. the event was posted (see Figure 7). You might look at this field to find out, for
  23799. instance, whether the Command key was down when a mouse-down event was posted (which
  23800. in many applications affects the way objects are selected) or when a key-down event
  23801. was posted (which could mean the user is choosing a menu item by typing its keyboard
  23802. equivalent).
  23803.  
  23804. •••Refer to Figure 7.•••
  23805.  
  23806. Figure 7–Modifier Flags
  23807.  
  23808. The following predefined constants are useful as masks for reading the flags in the
  23809. modifiers field:
  23810.  
  23811. #define activeFlag  1     /*set if window being activated*/
  23812. #define btnState    128   /*set if mouse button up*/
  23813. #define cmdKey      256   /*set if Command key down*/
  23814. #define shiftKey    512   /*set if Shift key down*/
  23815. #define alphaLock   1024  /*set if Caps Lock key down*/
  23816. #define optionKey   2048  /*set if Option key down*/
  23817. #define controlKey  4096  /*set if Control key down*/
  23818.  
  23819. The activeFlag bit gives further information about activate events; it’s set if the
  23820. window pointed to by the event message is being activated, or 0 if the window is
  23821. being deactivated. The remaining bits indicate the state of the mouse button and
  23822. modifier keys. Notice that the btnState bit is set if the mouse button is up, whereas
  23823. the bits for the four modifier keys are set if their corresponding keys are down.
  23824.  
  23825. æKY btnState
  23826. æFc Events.h
  23827. æT 
  23828. æD     btnState = 128, /*Bit 7 of low byte is mouse button state*/
  23829. æC 
  23830.  
  23831. æKY cmdKey
  23832. æFc Events.h
  23833. æT 
  23834. æD     cmdKey = 256, /*Bit 0*/
  23835. æC 
  23836.  
  23837. æKY shiftKey
  23838. æFc Events.h
  23839. æT 
  23840. æD     shiftKey = 512, /*Bit 1*/
  23841. æC 
  23842.  
  23843. æKY alphaLock
  23844. æFc Events.h
  23845. æT 
  23846. æD     alphaLock = 1024, /*Bit 2 */
  23847. æC 
  23848.  
  23849. æKY optionKey
  23850. æFc Events.h
  23851. æT 
  23852. æD     optionKey = 2048, /*Bit 3 of high byte*/
  23853. æC 
  23854.  
  23855. æKY controlKey
  23856. æFc Events.h
  23857. æT 
  23858. æD     controlKey = 4096,
  23859. æC 
  23860.  
  23861. æKY networkEvt
  23862. æFc Events.h
  23863. æT 
  23864. æD     networkEvt = 10,
  23865. æC 
  23866.  
  23867. æKY driverEvt
  23868. æFc Events.h
  23869. æT 
  23870. æD     driverEvt = 11,
  23871. æC 
  23872.  
  23873. æKY app1Evt
  23874. æFc Events.h
  23875. æT 
  23876. æD     app1Evt = 12,
  23877. æC 
  23878.  
  23879. æKY app2Evt
  23880. æFc Events.h
  23881. æT 
  23882. æD     app2Evt = 13,
  23883. æC 
  23884.  
  23885. æKY app3Evt
  23886. æFc Events.h
  23887. æT 
  23888. æD     app3Evt = 14,
  23889. æC 
  23890.  
  23891. æKY app4Evt
  23892. æFc Events.h
  23893. æT 
  23894. æD     app4Evt = 15,
  23895. æC 
  23896.  
  23897. æKY networkMask
  23898. æFc Events.h
  23899. æT 
  23900. æD     networkMask = 1024,
  23901. æC 
  23902.  
  23903. æKY driverMask
  23904. æFc Events.h
  23905. æT 
  23906. æD     driverMask = 2048,
  23907. æC 
  23908.  
  23909. æKY app1Mask
  23910. æFc Events.h
  23911. æT 
  23912. æD     app1Mask = 4096,
  23913. æC 
  23914.  
  23915. æKY app2Mask
  23916. æFc Events.h
  23917. æT 
  23918. æD     app2Mask = 8192,
  23919. æC 
  23920.  
  23921. æKY app3Mask
  23922. æFc Events.h
  23923. æT 
  23924. æD     app3Mask = 16384,
  23925. æC 
  23926.  
  23927. æKY app4Mask
  23928. æFc Events.h
  23929. æT 
  23930. æD     app4Mask = -32768,
  23931. æC 
  23932.  
  23933. æKY EventRecord
  23934. æFc Events.h
  23935. æT struct
  23936. æD struct EventRecord {
  23937.     short what;
  23938.     long message;
  23939.     long when;
  23940.     Point where;
  23941.     short modifiers;
  23942. };
  23943.  
  23944. typedef struct EventRecord EventRecord;
  23945. æC 
  23946. _______________________________________________________________________________
  23947.  
  23948. »EVENT RECORDS
  23949. _______________________________________________________________________________
  23950.  
  23951. Every event is represented internally by an event record containing all pertinent
  23952. information about that event. The event record includes the following information:
  23953.  
  23954.   •  the type of event
  23955.   •  the time the event was posted (in ticks since system startup)
  23956.   •  the location of the mouse at the time the event was posted (in global
  23957.      coordinates)
  23958.   •  the state of the mouse button and modifier keys at the time the event
  23959.      was posted
  23960.   •  any additional information required for a particular type of event, such
  23961.      as which key the user pressed or which window is being activated
  23962.  
  23963. Every event has an event record containing this information—even null events.
  23964.  
  23965. Event records are defined as follows:
  23966.  
  23967. TYPE  EventRecord = RECORD
  23968.                       what:       INTEGER;  {event code}
  23969.                       message:    LONGINT;  {event message}
  23970.                       when:       LONGINT;  {ticks since startup}
  23971.                       where:      Point;    {mouse location}
  23972.                       modifiers:  INTEGER   {modifier flags}
  23973.                     END;
  23974.  
  23975. The when field contains the number of ticks since the system last started up, and the
  23976. where field gives the location of the mouse, in global coordinates, at the time the
  23977. event was posted. The other three fields are described below.
  23978.  
  23979. _______________________________________________________________________________
  23980.  
  23981. »Event Code
  23982.  
  23983. The what field of an event record contains an event code identifying the type of the
  23984. event. The event codes are available as predefined constants:
  23985.  
  23986. CONST  nullEvent   =  0;    {null}
  23987.        mouseDown   =  1;    {mouse-down}
  23988.        mouseUp     =  2;    {mouse-up}
  23989.        keyDown     =  3;    {key-down}
  23990.        keyUp       =  4;    {key-up}
  23991.        autoKey     =  5;    {auto-key}
  23992.        updateEvt   =  6;    {update}
  23993.        diskEvt     =  7;    {disk-inserted}
  23994.        activateEvt =  8;    {activate}
  23995.        networkEvt  = 10;    {network}
  23996.        driverEvt   = 11;    {device driver}
  23997.        app1Evt     = 12;    {application-defined}
  23998.        app2Evt     = 13;    {application-defined}
  23999.        app3Evt     = 14;    {application-defined}
  24000.        app4Evt     = 15;    {application-defined}
  24001.  
  24002. _______________________________________________________________________________
  24003.  
  24004. »Event Message
  24005.  
  24006. The message field of an event record contains the event message, which conveys additional
  24007. important information about the event. The nature of this information depends on the
  24008. event type, as summarized in the following table and described below.
  24009.  
  24010.   Event type             Event message
  24011.  
  24012.   Keyboard               Character code, key code, and ADB address field
  24013.   Activate, update       Pointer to window
  24014.   Disk-inserted          Drive number in low-order word, File Manager
  24015.                          result code in high-order word
  24016.   Mouse-down,            Undefined
  24017.   mouse-up, null
  24018.   Network                Handle to parameter block
  24019.   Device driver          See chapter describing driver
  24020.   Application-defined    Whatever you wish
  24021.  
  24022. For keyboard events, the low-order byte of the low-order word of the event message
  24023. contains the ASCII character code generated by the key or combination of keys that
  24024. was pressed or released; usually this is all you’ll need.  However, as described in
  24025. the Apple Desktop Bus chapter, the Macintosh II and SE can be connected to multiple
  24026. keyboards.  To identify the origin of keyboard events, the keyboard event message
  24027. contains a new ADB address field.  It now has the structure shown in Figure 2.
  24028.  
  24029. Warning:  The high byte of the event message for keyboard events is reserved
  24030.           for future use, and is not presently guaranteed to be zero.
  24031.  
  24032. The event message for non-keyboard events remains the same as described above.
  24033.  
  24034. •••Refer to Figure 2.•••
  24035.  
  24036. Figure 2–Event Message for Keyboard Events
  24037.  
  24038. The key code in the event message for a keyboard event represents the character key
  24039. that was pressed or released; this value is always the same for any given character
  24040. key, regardless of the modifier keys pressed along with it. Key codes are useful in
  24041. special cases—in a music generator, for example—where you want to treat the keyboard
  24042. as a set of keys unrelated to characters. Figure 3 gives the key codes for all the
  24043. keys on the keyboard and keypad. (Key codes are shown for modifier keys here because
  24044. they’re meaningful in other contexts, as explained later.) Both the U.S. and international
  24045. keyboards are shown; in some cases the codes are quite different (for example, space
  24046. and Enter are reversed).
  24047.  
  24048. Three keyboards are now available as standard equipment with Macintosh computers sold
  24049. in the U.S.  They are
  24050.  
  24051.   •  The Macintosh Plus Keyboard, which includes cursor control keys and an
  24052.      integral keypad.  Its layout and key coding is shown in Figure 4.
  24053.   •  The Macintosh II Keyboard, also shipped with the Macintosh SE, which
  24054.      adds Esc (Escape) and Control keys and is connected to the Apple Desktop
  24055.      Bus.  Its layout and key coding is shown in Figure 5.
  24056.   •  The Apple Extended Keyboard,  which the user may connect to the Apple
  24057.      Desktop Bus of any Macintosh II or Macintosh SE computer.  Its layout
  24058.      and key coding is shown in Figure 6.
  24059.  
  24060. These figures show the virtual key codes for each key; they are the key codes that
  24061. actually appear in keyboard events.  In the case of the Macintosh II and Apple Extended
  24062. Keyboards, however, the hardware produces raw key codes, which may be different.  Raw
  24063. key codes are translated to virtual key codes by the
  24064. 'KMAP' resource in the System Folder.  By modifying the 'KMAP' resource you can
  24065. change the key codes for any keys.  Similarly, you can change the ASCII codes corresponding
  24066. to specific key codes by modifying the 'KCHR' resource in the System Folder.  The
  24067. 'KMAP' and 'KCHR' resources are described in the Resource Manager chapter.
  24068.  
  24069. With both the Macintosh II and the Apple Extended keyboards, the standard 'KMAP'
  24070. resource supplied in the system folder reassigns the following raw key codes to
  24071. different virtual key codes:
  24072.  
  24073.   Key           Raw key code    Virtual key code
  24074.  
  24075.   Control           36                3B
  24076.   Left cursor       3B                7B
  24077.   Right cursor      3C                7C
  24078.   Down cursor       3D                7D
  24079.   Up cursor         3E                7E
  24080.  
  24081. The standard 'KMAP' resource leaves all other raw key codes and virtual key codes the
  24082. same.
  24083.  
  24084. With the Apple Extended Keyboard, the virtual key codes for three more keys may be
  24085. easily reassigned, as described above under “Reassigning Right Key Codes”.
  24086.  
  24087. The following predefined constants are available to help you access the character
  24088. code and key code:
  24089.  
  24090. CONST  charCodeMask = $000000FF;    {character code}
  24091.        keyCodeMask  = $0000FF00;    {key code}
  24092.  
  24093. •••Refer to Figure 3.•••
  24094.  
  24095. Figure 3–Key Codes
  24096.  
  24097. •••Refer to Figure 4.•••
  24098.  
  24099. Figure 4–Macintosh Plus Keyboard
  24100.  
  24101. •••Refer to Figure 5.•••
  24102.  
  24103. Figure 5–Macintosh II Keyboard
  24104.  
  24105. •••Refer to Figure 6.•••
  24106.  
  24107. Figure 6–Apple Extended Keyboard
  24108.  
  24109. Note:  You can use the Toolbox Utility function BitAnd with these constants;
  24110.        for instance, to access the character code, use
  24111.  
  24112.          charCode := BitAnd(my Event.message,charCodeMask)
  24113. _______________________________________________________________________________
  24114.  
  24115. THE TOOLBOX EVENT MANAGER                                           
  24116. _______________________________________________________________________________
  24117.  
  24118. For activate and update events, the event message is a pointer to the window affected.
  24119. (If the event is an activate event, additional important information about the event
  24120. can be found in the modifiers field of the event record, as described below.)
  24121.  
  24122. For disk-inserted events, the low-order word of the event message contains the drive
  24123. number of the disk drive into which the disk was inserted:  1 for the Macintosh’s
  24124. built-in drive, and 2 for the external drive, if any. Numbers greater than 2 denote
  24125. additional disk drives connected to the Macintosh. By the time your application
  24126. receives a disk-inserted event, the system will already have attempted to mount the
  24127. volume on the disk by calling the File Manager function MountVol; the high-order word
  24128. of the event message will contain the result code returned by MountVol.
  24129.  
  24130. For mouse-down, mouse-up, and null events, the event message is undefined and should
  24131. be ignored. The event message for a network event contains a handle to a parameter
  24132. block, as described in the AppleTalk Manager chapter. For device driver events, the
  24133. contents of the event message depend on the situation under which the event was
  24134. generated; the chapters describing those situations will give the details. Finally,
  24135. you can use the event message however you wish for application-defined event types.
  24136.  
  24137. _______________________________________________________________________________
  24138.  
  24139. »Modifier Flags
  24140.  
  24141. As mentioned above, the modifiers field of an event record contains further information
  24142. about activate events and the state of the modifier keys and mouse button at the time
  24143. the event was posted (see Figure 7). You might look at this field to find out, for
  24144. instance, whether the Command key was down when a mouse-down event was posted (which
  24145. in many applications affects the way objects are selected) or when a key-down event
  24146. was posted (which could mean the user is choosing a menu item by typing its keyboard
  24147. equivalent).
  24148.  
  24149. •••Refer to Figure 7.•••
  24150.  
  24151. Figure 7–Modifier Flags
  24152.  
  24153. The following predefined constants are useful as masks for reading the flags in the
  24154. modifiers field:
  24155.  
  24156. CONST  activeFlag = 1;     {set if window being activated}
  24157.        btnState   = 128;   {set if mouse button up}
  24158.        cmdKey     = 256;   {set if Command key down}
  24159.        shiftKey   = 512;   {set if Shift key down}
  24160.        alphaLock  = 1024;  {set if Caps Lock key down}
  24161.        optionKey  = 2048;  {set if Option key down}
  24162.        ControlKey = 4096;  {set if Control key down}
  24163.  
  24164. The activeFlag bit gives further information about activate events; it’s set if the
  24165. window pointed to by the event message is being activated, or 0 if the window is
  24166. being deactivated. The remaining bits indicate the state of the mouse button and
  24167. modifier keys. Notice that the btnState bit is set if the mouse button is up, whereas
  24168. the bits for the four modifier keys are set if their corresponding keys are down.
  24169.  
  24170. æKY KeyMap
  24171. æFc Events.h
  24172. æT typedef
  24173. æD typedef long KeyMap[4];
  24174. æC 
  24175.  
  24176. æKY GetNextEvent
  24177. æFc Events.h
  24178. æT Function
  24179. æTN A970
  24180. æD pascal Boolean GetNextEvent(short eventMask,EventRecord *theEvent)
  24181.     = 0xA970; 
  24182. æDT Boolean myVariable = GetNextEvent((short) eventMask,(EventRecord *) theEvent);
  24183. æMM
  24184. æRT 3, 5, 85, 194, 205 
  24185. æRI I-257, N3-1, N5-1, N85, P-30, 32, 34, 39, 40, 97, 108, 173
  24186. æC 
  24187. GetNextEvent returns the next available event of a specified type or types and, if
  24188. the event is in the event queue, removes it from the queue. The event is returned in
  24189. the parameter theEvent. The eventMask parameter specifies which event types are of
  24190. interest. GetNextEvent returns the next available event of any type designated by the
  24191. mask, subject to the priority rules discussed above under “Priority of Events”. If no
  24192. event of any of the designated types is available, GetNextEvent returns a null event.
  24193.  
  24194. Note:  Events in the queue that aren’t designated in the mask are kept in
  24195.        the queue; if you want to remove them, you can do so by calling the
  24196.        Operating System Event Manager procedure FlushEvents.
  24197.  
  24198. Before reporting an event to your application, GetNextEvent first calls the Desk
  24199. Manager function SystemEvent to see whether the system wants to intercept and respond
  24200. to the event. If so, or if the event being reported is a null event, GetNextEvent
  24201. returns a function result of FALSE; a function result of TRUE means that your application
  24202. should handle the event itself. The Desk Manager intercepts the following events:
  24203.  
  24204.   •  activate and update events directed to a desk accessory
  24205.   •  mouse-up and keyboard events, if the currently active window belongs to
  24206.      a desk accessory
  24207.  
  24208. Note:  In each case, the event is intercepted by the Desk Manager only if
  24209.        the desk accessory can handle that type of event; however, as a rule
  24210.        all desk accessories should be set up to handle activate, update, and
  24211.        keyboard events and should not handle mouse-up events.
  24212.  
  24213. The Desk Manager also intercepts disk-inserted events:  It attempts to mount the
  24214. volume on the disk by calling the File Manager function MountVol. GetNextEvent will
  24215. always return TRUE in this case, though, so that your application can take any further
  24216. appropriate action after examining the result code returned by MountVol in the event
  24217. message. (See the Desk Manager and File Manager chapters.) GetNextEvent returns TRUE
  24218. for all other non-null events
  24219. (including all mouse-down events, regardless of which window is active), leaving them
  24220. for your application to handle.
  24221.  
  24222. GetNextEvent also makes the following processing happen, invisible to your program:
  24223.  
  24224.   •  If the “alarm” is set and the current time is the alarm time, the alarm
  24225.      goes off (a beep followed by blinking the apple symbol in the menu bar).
  24226.      The user can set the alarm with the Alarm Clock desk accessory.
  24227.   •  If the user holds down the Command and Shift keys while pressing a
  24228.      numeric key that has a special effect, that effect occurs. The standard
  24229.      such keys are 1 and 2 for ejecting the disk in the internal or external
  24230.      drive, and 3 and 4 for writing a snapshot of the screen to a MacPaint
  24231.      document or to the printer.
  24232.  
  24233. Note:  Advanced programmers can implement their own code to be executed in
  24234.        response to Command-Shift-number combinations (except for Command-
  24235.        Shift-1 and 2, which can’t be changed). The code corresponding to a
  24236.        particular number must be a routine having no parameters, stored in
  24237.        a resource whose type is 'FKEY' and whose ID is the number. The
  24238.        system resource file contains code for the numbers 3 and 4.
  24239.  
  24240. Assembly-language note:  You can disable GetNextEvent’s processing of Command-
  24241.                          Shift-number combinations by setting the global
  24242.                          variable ScrDmpEnb (a byte) to 0.
  24243.  
  24244. æKY WaitNextEvent
  24245. æFc Events.h
  24246. æT Function
  24247. æTN A860
  24248. æD pascal Boolean WaitNextEvent(short eventMask,EventRecord *theEvent,unsigned long sleep,
  24249.     RgnHandle mouseRgn)
  24250.     = 0xA860; 
  24251. æDT Boolean myVariable = WaitNextEvent((short) eventMask,(EventRecord *) theEvent,(unsigned long) sleep,()
  24252.     RgnHandle mouseRgn);
  24253. æRT 158, 177, 180, 194, 205
  24254. æRI N158-1
  24255. æC 
  24256.  
  24257. æKY EventAvail
  24258. æFc Events.h
  24259. æT Function
  24260. æTN A971
  24261. æD pascal Boolean EventAvail(short eventMask,EventRecord *theEvent)
  24262.     = 0xA971; 
  24263. æDT Boolean myVariable = EventAvail((short) eventMask,(EventRecord *) theEvent);
  24264. æMM
  24265. æRT 194
  24266. æRI I-259
  24267. æC 
  24268. EventAvail works exactly the same as GetNextEvent except that if the event is in the
  24269. event queue, it’s left there.
  24270.  
  24271. Note:  An event returned by EventAvail will not be accessible later if in
  24272.        the meantime the queue becomes full and the event is discarded from
  24273.        it; since the events discarded are always the oldest ones in the queue,
  24274.        however, this will happen only in an unusually busy environment.
  24275.  
  24276. æKY GetMouse
  24277. æFc Events.h
  24278. æT Function
  24279. æTN A972
  24280. æD pascal void GetMouse(Point *mouseLoc)
  24281.     = 0xA972; 
  24282. æDT GetMouse((Point *) mouseLoc);
  24283. æMM
  24284. æRI I-259
  24285. æC  
  24286. GetMouse returns the current mouse location in the mouseLoc parameter. The location
  24287. is given in the local coordinate system of the current grafPort (which might be, for
  24288. example, the currently active window). Notice that this differs from the mouse location
  24289. stored in the where field of an event record; that location is always in global
  24290. coordinates.
  24291.  
  24292. æKY Button
  24293. æFc Events.h
  24294. æT Function
  24295. æTN A974
  24296. æD pascal Boolean Button(void)
  24297.     = 0xA974; 
  24298. æDT Boolean myVariable = Button()(void);
  24299. æMM
  24300. æRI I-259
  24301. æC 
  24302. The Button function returns TRUE if the mouse button is currently down, and FALSE if
  24303. it isn’t.
  24304.  
  24305. æKY StillDown
  24306. æFc Events.h
  24307. æT Function
  24308. æTN A973
  24309. æD pascal Boolean StillDown(void)
  24310.     = 0xA973; 
  24311. æDT Boolean myVariable = StillDown()(void);
  24312. æMM
  24313. æRT 194
  24314. æRI I-259
  24315. æC 
  24316. Usually called after a mouse-down event, StillDown tests whether the mouse button is
  24317. still down. It returns TRUE if the button is currently down and there are no more
  24318. mouse events pending in the event queue. This is a true test of whether the button is
  24319. still down from the original press—unlike Button (above), which returns TRUE whenever
  24320. the button is currently down, even if it has been released and pressed again since
  24321. the original mouse-down event.
  24322.  
  24323. æKY WaitMouseUp
  24324. æFc Events.h
  24325. æT Function
  24326. æTN A977
  24327. æD pascal Boolean WaitMouseUp(void)
  24328.     = 0xA977; 
  24329. æDT Boolean myVariable = WaitMouseUp()(void);
  24330. æMM
  24331. æRT 194
  24332. æRI I-259
  24333. æC 
  24334. WaitMouseUp works exactly the same as StillDown (above), except that if the button is
  24335. not still down from the original press, WaitMouseUp removes the preceding mouse-up
  24336. event before returning FALSE. If, for instance, your application attaches some special
  24337. significance both to mouse double-clicks and to mouse-up events, this function would
  24338. allow your application to recognize a double-click without being confused by the
  24339. intervening mouse-up.
  24340.  
  24341. æKY GetKeys
  24342. æFc Events.h
  24343. æT Function
  24344. æTN A976
  24345. æD pascal void GetKeys(KeyMap theKeys)
  24346.     = 0xA976; 
  24347. æDT GetKeys((KeyMap) theKeys);
  24348. æMM
  24349. æRI I-259
  24350. æC 
  24351. GetKeys reads the current state of the keyboard (and keypad, if any) and returns it
  24352. in the form of a keyMap:
  24353.  
  24354. TYPE KeyMap = PACKED ARRAY[0..127] OF BOOLEAN;
  24355.  
  24356. Each key on the keyboard or keypad corresponds to an element in the keyMap. The index
  24357. into the keyMap for a particular key is the same as the key code for that key. (The
  24358. key codes are shown in Figure 3 above.) The keyMap element is TRUE if the corresponding
  24359. key is down and FALSE if it isn’t. The maximum number of keys that can be down simultaneously
  24360. is two character keys plus any combination of the four modifier keys.
  24361.  
  24362. æKY TickCount
  24363. æFc Events.h
  24364. æT Function
  24365. æTN A975
  24366. æD pascal unsigned long TickCount(void)
  24367.     = 0xA975; 
  24368. æDT unsigned long myVariable = TickCount()(void);
  24369. æMM
  24370. æRI I-260
  24371. æC 
  24372. TickCount returns the current number of ticks (sixtieths of a second) since the
  24373. system last started up.
  24374.  
  24375. Warning:  Don’t rely on the tick count being exact; it will usually be
  24376.           accurate to within one tick, but may be off by more than that. The
  24377.           tick count is incremented during the vertical retrace interrupt,
  24378.           but it’s possible for this interrupt to be disabled. Furthermore,
  24379.           don’t rely on the tick count being incremented to a certain value,
  24380.           such as testing whether it has become equal to its old value plus 1;
  24381.           check instead for “greater than or equal to” (since an interrupt
  24382.           task may keep control for more than one tick).
  24383.  
  24384. Assembly-language note:  The value returned by this function is also contained
  24385.                          in the global variable Ticks.
  24386.  
  24387. æKY GetDblTime
  24388. æFc Events.h
  24389. æT Function
  24390. æD #define GetDblTime() (* (unsigned long*) 0x02F0)
  24391. æDT #define myVariable = GetDblTime();
  24392. æRI I-260
  24393. æC 
  24394. [Not in ROM]
  24395.  
  24396. GetDblTime returns the suggested maximum difference (in ticks) that should exist
  24397. between the times of a mouse-up event and a mouse-down event for those two mouse
  24398. clicks to be considered a double-click. The user can adjust this value by means of
  24399. the Control Panel desk accessory.
  24400.  
  24401. Assembly-language note:  This value is available to assembly-language
  24402.                          programmers in the global variable DoubleTime.
  24403.  
  24404. æKY GetCaretTime
  24405. æFc Events.h
  24406. æT Function
  24407. æD #define GetCaretTime() (* (unsigned long*) 0x02F4)
  24408. æDT #define myVariable = GetCaretTime();
  24409. æRI I-260
  24410. æC 
  24411. [Not in ROM]
  24412.  
  24413. GetCaretTime returns the time (in ticks) between blinks of the “caret” (usually a
  24414. vertical bar) marking the insertion point in editable text. If you aren’t using
  24415. TextEdit, you’ll need to cause the caret to blink yourself; on every pass through
  24416. your program’s main event loop, you should check this value against the elapsed time
  24417. since the last blink of the caret. The user can adjust this value by means of the
  24418. Control Panel desk accessory.
  24419.  
  24420. Assembly-language note:  This value is available to assembly-language
  24421.                          programmers in the global variable CaretTime.
  24422.  
  24423.  
  24424. æKY FCntl.h
  24425. æC 
  24426. close    faccess    open    unlink
  24427. creat    fcntl      read    write
  24428. dup      lseek      
  24429.  
  24430. F_DELETE       F_OPEN         O_APPEND    O_RDWR
  24431. F_DUPFD        F_RENAME       O_CREAT     O_RSRC
  24432. F_GFONTINFO    F_SFONTINFO    O_EXCL      O_TRUNC
  24433. F_GPRINTREC    F_SPRINTREC    O_RDONLY    O_WRONLY
  24434. F_GTABINFO     F_STABINFO     
  24435.  
  24436. Low-level file I/O (non-ANSI extensions)—FCntl.h
  24437. non-ANSI extensions:low-level file I/O
  24438. MPW 3.0 C contains several file-control functions in addition to those required  
  24439. by the ANSI draft C standard. These functions, declared in the header file  
  24440. FCntl.h, preserve compatibility with MPW 2.0 C. 
  24441. Some of these functions duplicate, at a lower level, functions in the header  
  24442. file StdIO.h. (For example, open is a low-level equivalent of fopen.) Using  
  24443. the StdIO.h functions whenever possible will improve portability and robustness.
  24444.  
  24445. æKY close
  24446. æFc FCntl.h
  24447. æC                           Synopsis
  24448.  
  24449. #include <FCntl.h>
  24450. int close(int fildes);
  24451.  
  24452.                            Description
  24453.  
  24454. The close; function closes the file descriptor indicated by fildes. 
  24455. Parameter fildes is a file descriptor obtained from an open, creat, 
  24456. dup, or fcntl call. 
  24457. The function close fails if fildes is not a valid open file descriptor [EBADF].
  24458.  
  24459.                           Diagnostics
  24460.  
  24461. Upon successful completion, a value of 0 is returned. Otherwise, a value 
  24462. of –1 is returned and errno is set to indicate the error.
  24463.  
  24464. See also
  24465. creat, dup, fclose, fcntl, ferror, open, stdio
  24466.  
  24467. æKY creat
  24468. æFc FCntl.h
  24469. æC                           Synopsis
  24470.  
  24471. #include <FCntl.h>
  24472. int creat(const char *filename);
  24473.  
  24474.                            Description
  24475.  
  24476. The creat; function creates a new file or prepares to rewrite an existing  
  24477. file, filename. If the file exists, the length of its data fork is set to 0.
  24478. The function creat(filename) is equivalent to open(filename,  
  24479. O_WRONLY|O_TRUNC|O_CREAT)
  24480.  
  24481. Upon successful completion, a nonnegative integer (the file descriptor)  
  24482. is returned and the file is open for writing. The file pointer is set to  
  24483. the beginning of the file. A maximum of about 30 files may be open at a  
  24484. given time: the actual maximum depends upon the current system environment.
  24485.  
  24486.                           Return value
  24487.  
  24488. Upon successful completion, a nonnegative integer (the file descriptor)  
  24489. is returned. Otherwise, a value of –1 is returned and errno is set to  
  24490. indicate the error.
  24491.  
  24492.                            Note
  24493.  
  24494. Other implementations of creat specify a second parameter, mode. This version 
  24495. ignores any second parameter.
  24496.  
  24497. See also
  24498. close, open, read, write
  24499.  
  24500. æKY dup
  24501. æFc FCntl.h
  24502. æC                           Synopsis
  24503.  
  24504. #include <Fcntl.h>
  24505. int dup(int fildes);
  24506.  
  24507.                            Description
  24508.  
  24509. The dup; function returns a new file descriptor with these features:
  24510.  It refers to the same open file as the original.
  24511.  It uses the same file pointer as the original.
  24512.  It has the same access mode (that is, read, write, or read/write) as the 
  24513.  original.
  24514. The fildes parameter is a file descriptor obtained from an open, creat, 
  24515. dup, or fcntl call. The new file descriptor returned by dup is the lowest 
  24516. one available.
  24517. The function call dup(fildes) is equivalent to fcntl(fildes, F_DUPFD, 0).
  24518. The dup function fails if parameter fildes is not a valid open file descriptor 
  24519. [EBADF].
  24520.  
  24521.                           Return value
  24522.  
  24523. Upon successful completion, a nonnegative integer (the file descriptor) 
  24524. is returned. Otherwise, a value of –1 is returned and errno is set to 
  24525. indicate the error.
  24526.  
  24527. See also
  24528. close, fcntl, ferror, open
  24529.  
  24530. æKY F_DELETE
  24531. æFc FCntl.h
  24532. æD #define F_DELETE (('d'<<8)|01)
  24533.  
  24534.  
  24535. æKY F_DUPFD
  24536. æFc FCntl.h
  24537. æD #define F_DUPFD  0 /*Duplicate fildes*/
  24538.  
  24539.  
  24540. æKY F_GFONTINFO
  24541. æFc FCntl.h
  24542. æD #define F_GFONTINFO  (('e'<<8)|02)
  24543.  
  24544.  
  24545. æKY F_GPRINTREC
  24546. æFc FCntl.h
  24547. æD #define F_GPRINTREC  (('e'<<8)|04)
  24548.  
  24549.  
  24550. æKY F_GTABINFO
  24551. æFc FCntl.h
  24552. æD #define F_GTABINFO   (('e'<<8)|00) /*'e' => "editor" ops*/
  24553.  
  24554.  
  24555. æKY F_OPEN
  24556. æFc FCntl.h
  24557. æD #define F_OPEN   (('d'<<8)|00) /*d' => "directory" ops*/
  24558.  
  24559.  
  24560. æKY F_RENAME
  24561. æFc FCntl.h
  24562. æD #define F_RENAME (('d'<<8)|02)
  24563.  
  24564.  
  24565. æKY F_SFONTINFO
  24566. æFc FCntl.h
  24567. æD #define F_SFONTINFO  (('e'<<8)|03)
  24568.  
  24569.  
  24570. æKY F_SPRINTREC
  24571. æFc FCntl.h
  24572. æD #define F_SPRINTREC  (('e'<<8)|05)
  24573.  
  24574.  
  24575. æKY F_STABINFO
  24576. æFc FCntl.h
  24577. æD #define F_STABINFO   (('e'<<8)|01)
  24578.  
  24579.  
  24580. æKY faccess
  24581. æFc FCntl.h
  24582. æC                           Synopsis
  24583.  
  24584. #include <FCntl.h>
  24585. int faccess(const char *filename, unsigned int cmd, long *arg);
  24586.  
  24587.                            Description
  24588.  
  24589. The faccess; function provides access to control and status information for 
  24590. named files. (Compare function ioctl, which provides different control and 
  24591. status information for open files.)
  24592. The cmd parameter must be set to one of the constants in the following list 
  24593. to indicate what operation is to be performed on the file. As Noted in the 
  24594. list, some calls to faccess also require the arg parameter, usually as a 
  24595. long or as a pointer to a long.
  24596. The following commands are available to all programs:
  24597. Value of cmd   Description
  24598.  
  24599. F_DELETE Deletes the named file, or returns an error if the file is open. 
  24600.          Parameter arg is ignored.
  24601. F_RENAME Renames the named file. Parameter arg is a pointer to a string 
  24602.          containing the new name.
  24603.  
  24604. The following commands can be used only by MPW tools:
  24605. Value of cmd Description
  24606.  
  24607. F_GTABINFO   Gets the tab offset for the MPW text file filename. The tab 
  24608.              offset is stored in the long integer pointed to by arg.
  24609.              The tab offset is expressed as an integer number of spaces. 
  24610.              The width of the space character in the current font determines 
  24611.              the actual distance of the tab offset.
  24612. F_STABINFO   Sets the tab offset for the MPW text file filename. The tab 
  24613.              offset is specified as a long value in arg.
  24614. F_GFONTINFO  Gets the font number and font size for an MPW text file 
  24615.              filename. The font number is stored in the high-order half 
  24616.              of the long pointed to by arg; the font size is stored in the 
  24617.              low order half of the same long.
  24618. F_SFONTINFO  Sets the font number and font size for the MPW text file, 
  24619.              filename. The font number is specified in the high-order half 
  24620.              of arg; the font size is specified in the low-order half of arg.
  24621. F_GPRINTREC  Gets a print record TPrint for an MPW text file, filename; arg 
  24622.              is a handle to the print record.
  24623. F_SPRINTREC  Sets a print record for the MPW text file filename; arg is a 
  24624.              handle to the print record.
  24625. F_OPE        Reserved for operating system use.
  24626. F_GSELINFO   Gets the selection information for the MPW text file filename.
  24627. F_SSELINFO   Sets the selection information for the MPW text file filename.
  24628. F_GWININFO   Gets the current window position.
  24629. F_SWININFO   Sets the current window position.
  24630.  
  24631. The commands F_GTABINFO and F_GFONTINFO pass arg as a pointer to a long; 
  24632. F_STABINFO and F_SFONTINFO pass arg as a long value; and F_GPRINTREC and 
  24633. F_SPRINTREC pass arg as a handle to a print record.
  24634.  
  24635.                            Return values
  24636.  
  24637. Upon successful completion, faccess returns a nonnegative value, usually 0. 
  24638. If the device for the named file cannot perform the requested command, 
  24639. faccess returns –1 and errno is set to indicate the error.
  24640. If the requested resource for F_GTABINFO, F_GFONTINFO, or F_GPRINTREC 
  24641. does not exist for the named file, default values are stored and the 
  24642. function returns a value greater than 0.
  24643.  
  24644.                            Note
  24645.  
  24646. Before faccess is called with F_GPRINTREC or F_SPRINTREC, the 
  24647. Printing Manager must be initialized and the print record handle THPrint 
  24648. must be allocated. The font size must be 9, 10, 12, 14, 18, or 24; the 
  24649. font number must be 0 or a positive integer. The following sequence must 
  24650. be used with these print command values:
  24651. res = CurResFile();
  24652. PRClose();
  24653. UseResFile(res);
  24654. PROpen();
  24655.  /* do whatever, including call faccess print commands */
  24656. PRClose();
  24657. UseResFile(res);
  24658.  
  24659. See also
  24660. ioctl, unlink
  24661.  
  24662. æKY fcntl
  24663. æFc FCntl.h
  24664. æC                           Synopsis
  24665.  
  24666. #include <FCntl.h>
  24667. int fcntl(int fildes, unsigned int cmd, int arg);
  24668.  
  24669.                            Description
  24670.  
  24671. The fcntl; function duplicates a file descriptor. A file 
  24672. remains open until all of its file descriptors are closed.
  24673. The fildes parameter is an open file descriptor obtained from 
  24674. an open, creat, dup, or fcntl call. The cmd parameter takes the 
  24675. value F_DUPFD, which tells fcntl to return the lowest-numbered 
  24676. available file descriptor greater than or equal to arg. Normally 
  24677. arg is greater than or equal to 3, to avoid obtaining the standard 
  24678. file descriptors 0, 1, and 2. The function fcntl returns a new 
  24679. file descriptor that points to the same open file as fildes. The 
  24680. new file descriptor has the same access mode (read, write, or 
  24681. read/write) and file pointer as fildes. Any I/O operation 
  24682. changes the file pointer for all file descriptors that share it.
  24683.  
  24684. The fcntl function fails if one or more of the following error 
  24685. conditions are true:
  24686.  Parameter fildes is not a valid open file descriptor [EBADF].
  24687.  Parameter arg is negative or greater than the highest 
  24688.  allowable file descriptor [EINVAL].
  24689.  
  24690.                            Return values
  24691.  
  24692. Upon successful completion, the value returned is a new file 
  24693. descriptor. Otherwise, a value of –1 is returned and errno is 
  24694. set to indicate the error.
  24695.  
  24696.                            Note
  24697.  
  24698. MPW 3.0 C does not support the F_GETFD, F_SETFD, F_GETFL, and 
  24699. F_SETFL commands of fcntl.
  24700.  
  24701. See also
  24702. close, dup, ferror, ioctl, open
  24703.  
  24704. æKY lseek
  24705. æFc FCntl.h
  24706. æC                           Synopsis
  24707.  
  24708. #include <FCntl.h>
  24709. #define SEEK_SET 0
  24710. #define SEEK_CUR 1
  24711. #define SEEK_END 2
  24712. long lseek(int fildes, long int offset, int whence);
  24713.  
  24714.                            Description
  24715.  
  24716. A file descriptor, fildes, is returned from a call to creat, dup, fcntl, 
  24717. or open. The lseek; function sets the file pointer associated with fildes, 
  24718. thus determining the position of the next read or write operation. 
  24719. The value of whence determines how the offset parameter is used, according 
  24720. to these rules:
  24721.  If whence is SEEK_SET, the new position is offset bytes from the beginning 
  24722.  of the file.
  24723.  If whence is SEEK_CUR, the new position is the current location plus offset.
  24724.  If whence is SEEK_END, the new position is the size of the file plus offset.
  24725.  If whence is SEEK_SET or SEEK_CUR, the value of offset may be negative.
  24726. Upon successful completion, the file-pointer value as measured in bytes from 
  24727. the beginning of the file is returned.
  24728. The file pointer remains unchanged and lseek fails if one or more of the 
  24729. following error conditions are true:
  24730.  File descriptor fildes is not open [EBADF].
  24731.  Parameter whence is not equal to SEEK_SET, SEEK_CUR, or SEEK_END [EINVAL].
  24732.  The resulting file pointer would point past the end-of-file [ESPIPE].
  24733.  The resulting file pointer would point before the beginning of the file [EINVAL].
  24734. Some devices are incapable of seeking. The value of the file pointer associated 
  24735. with such a device is undefined.
  24736.  
  24737.                            Return values
  24738.  
  24739. Upon successful completion, a nonnegative long integer indicating the 
  24740. file-pointer value is returned. Otherwise, a value of –1 is returned 
  24741. and errno is set to indicate the error.
  24742.  
  24743.                            Note
  24744.  
  24745. In previous versions of the Standard C Library, tell;(fildes) was a function 
  24746. that returned the current file position. It is equivalent to the call 
  24747. lseek(fildes, 0L, 1).
  24748.  
  24749.                            Warning
  24750.  
  24751. The lseek function has no effect on a file opened with the O_APPEND flag 
  24752. because the next write to the file always repositions the file pointer to 
  24753. the end before writing.
  24754.  
  24755. See also
  24756. ferror, fseek, open, stdio, write
  24757.  
  24758. æKY O_APPEND
  24759. æFc FCntl.h
  24760. æD #define O_APPEND (1<<3) /*append (writes guaranteed at the end)*/
  24761.  
  24762.  
  24763. æKY O_CREAT
  24764. æFc FCntl.h
  24765. æD #define O_CREAT  (1<<8) /*Open with file create*/
  24766.  
  24767.  
  24768. æKY O_EXCL
  24769. æFc FCntl.h
  24770. æD #define O_EXCL   (1<<10) /*Exclusive open*/
  24771.  
  24772.  
  24773. æKY O_RDONLY
  24774. æFc FCntl.h
  24775. æD #define O_RDONLY 0 /*Bits 0 and 1 are used internally*/
  24776.  
  24777.  
  24778. æKY O_RDWR
  24779. æFc FCntl.h
  24780. æD #define O_RDWR   2
  24781.  
  24782.  
  24783. æKY O_RSRC
  24784. æFc FCntl.h
  24785. æD #define O_RSRC   (1<<4) /*Open the resource fork*/
  24786.  
  24787.  
  24788. æKY O_TRUNC
  24789. æFc FCntl.h
  24790. æD #define O_TRUNC  (1<<9) /*Open with truncation*/
  24791.  
  24792.  
  24793. æKY O_WRONLY
  24794. æFc FCntl.h
  24795. æD #define O_WRONLY 1 /*Values 0..2 are historical*/
  24796.  
  24797.  
  24798. æKY open
  24799. æFc FCntl.h
  24800. æC                           Synopsis
  24801.  
  24802. #include <FCntl.h>
  24803. int open(const char *filename, int oflag);
  24804.  
  24805.                            Description
  24806.  
  24807. The open; function opens a file descriptor for the named file and sets the  
  24808. file-status flags according to the value of oflag. The parameter filename 
  24809. is a disk file, window, selection, or pseudofile. (See “Pseudo-Filenames”  
  24810. in Chapter 5 of the Macintosh Programmer’s Workshop 3.0 Reference for more  
  24811. information.) The value of oflag is constructed by performing an OR operation 
  24812. on the flag settings, for example:
  24813. fildes = open("MyFile", O_WRONLY|O_CREAT|O_TRUNC);
  24814. To construct oflag, first select one of the following access modes:
  24815.  O_RDONLY    Open for reading only.
  24816.  WR_ONLY     Open for writing only.
  24817.  O_RDWR      Open for reading and writing.
  24818.  
  24819. Then optionally add one or more of these modifiers:
  24820.  O_APPEND    The file pointer is set to the end of the file before each write.
  24821.  O_CREAT     If the file does not exist, it is created.
  24822.  O_TRUNC     If the file exists, its length is truncated to 0; the mode is  
  24823.              unchanged.
  24824.  O_RSRC      The file’s resource fork is opened. (Normally, the data fork is  
  24825.              opened.)
  24826.  O_BINARY    Open as a binary stream (supported but not used by the system).
  24827.  
  24828. The following setting is valid only if O_CREAT is also specified:
  24829.  O_EXCL      The function open fails if the file exists.
  24830.              Upon successful completion, a nonnegative integer (the file  
  24831.              descriptor) is returned. The file pointer used to mark the  
  24832.              current position within the file is set to the beginning of  
  24833.              the file.
  24834.  
  24835. The named file is opened unless one or more of the following error  
  24836. conditions is true:
  24837.  O_CREAT is not set and the named file does not exist [ENOENT].
  24838.  More than about 30 file descriptors are currently open. The actual limit 
  24839.  varies according to run-time conditions [EMFILE].
  24840.  O_CREAT and O_EXCL are set and the named file exists [EEXIST].
  24841.  
  24842.                           Return value
  24843.  
  24844. Upon successful completion, a nonnegative integer (the file descriptor)  
  24845. is returned. Otherwise, a value of –1 is returned and errno is set to  
  24846. indicate the error.
  24847.  
  24848. See also
  24849. close, creat, dup, fcntl, ferror, fopen, lseek, read, stdio, write
  24850.  
  24851. æKY read
  24852. æFc FCntl.h
  24853. æC                           Synopsis
  24854.  
  24855. #include <Fcntl.h>
  24856. int read(int fildes, char* buf, unsigned long nbyte);
  24857.  
  24858.                            Description
  24859.  
  24860. The read; function transfers up to nbyte bytes from the file associated 
  24861. with fildes into the buffer pointed to by buf. File descriptor fildes is
  24862. obtained from a call to open, creat, a, or a.
  24863. On devices capable of seeking, read starts reading at the current position 
  24864. of the file pointer associated with fildes. Upon return from read, the 
  24865. file pointer is incremented by the number of bytes actually read.
  24866. Nonseeking devices always read from the current position. The value of a 
  24867. file pointer associated with such a file is undefined.
  24868.  
  24869. Upon successful completion, read returns the number of bytes actually read 
  24870. and placed in the buffer. This number may be less than nbyte if the file 
  24871. is associated with a window or if the number of bytes left in the file is 
  24872. less than nbyte bytes. A value of 0 is returned when an end-of-file has 
  24873. been reached, and a value of –1 is returned if a read error occurred.
  24874. The function read fails if fildes is not a valid file descriptor open for
  24875. reading. [EBADF]
  24876. File descriptor 0 is opened by the MPW Shell as standard input.
  24877.  
  24878.                            Return values
  24879.  
  24880. Upon successful completion, a nonnegative integer is returned, indicating 
  24881. the number of bytes actually read. Otherwise, –1 is returned and errno is 
  24882. set to indicate the error.
  24883.  
  24884. See also
  24885. creat, ferror, fread, open, stdio
  24886.  
  24887. æKY unlink
  24888. æFc FCntl.h
  24889. æC                           Synopsis
  24890.  
  24891. #include <FCntl.h>
  24892. int unlink(const char *fileName);
  24893.  
  24894.                            Description
  24895.  
  24896. The unlink; function deletes the named file. The function fails if the 
  24897. named file is open. This function is the UNIX (and MPW 2.0 C) equivalent
  24898.  of the ANSI remove function, and is included for compatibility.
  24899. A call to unlink is equivalent to faccess(fileName, F_DELETE, 0)
  24900.  
  24901.                           Diagnostics
  24902.  
  24903. Upon successful completion, a value of 0 is returned. Otherwise, a value 
  24904. of –1 is returned and errno is set to indicate the error.
  24905.  
  24906. See also
  24907. faccess
  24908.  
  24909. æKY write
  24910. æFc FCntl.h
  24911. æC                           Synopsis
  24912.  
  24913. #include <Fcntl.h>
  24914. int write(int fildes, const char* buf, unsigned long nbyte);
  24915.  
  24916.                            Description
  24917.  
  24918. The write; function attempts to write nbyte bytes from the buffer pointed 
  24919. to by buf to the file associated with the fildes. File descriptor fildes 
  24920. is obtained from an open, creat, dup, or fcntl call. Internal limitations 
  24921. may cause write to write fewer bytes than requested; the number of bytes 
  24922. actually written is indicated by the return value. Several calls to write 
  24923. may therefore be necessary to write out the contents of buf.
  24924. On devices capable of seeking, the actual writing of data proceeds from the 
  24925. position in the file indicated by the file pointer. Upon return from write, 
  24926. the file pointer is incremented by the number of bytes actually written.
  24927. On nonseeking devices, writing starts at the current position. The value of 
  24928. a file pointer associated with such a device is undefined.
  24929. If the O_APPEND file-status flag set in open is on, the file pointer is set 
  24930. to end-of-file before each write.
  24931. The file pointer remains unchanged and write fails if fildes is not a valid 
  24932. file descriptor open for writing [EBADF].
  24933. If you try to write more bytes than there is room for on the device, write 
  24934. writes as many bytes as possible. For example, if nbyte is 512 and there is 
  24935. room for 20 bytes more on the device, write writes 20 bytes and returns a 
  24936. value of 20. The next attempt to write a nonzero number of bytes will return 
  24937. an error [ENOSPC].
  24938. File descriptor 1 is opened by the MPW Shell as standard output; file 
  24939. descriptor 2, as standard error.
  24940.  
  24941.                           Return value
  24942.  
  24943. Upon successful completion, the number of bytes actually written is returned. 
  24944. Otherwise, –1 is returned and errno is set to indicate the error.
  24945.  
  24946. See also
  24947. creat, ferror, fread, lseek, open, stdio
  24948.  
  24949. æKY closeæ
  24950. æDT 
  24951. int myVariabel = close((int) fildes);
  24952.  
  24953. æKY creatæ
  24954. æDT
  24955. int myVariable = creat((const char *)filename);
  24956.  
  24957. æKY dupæ
  24958. æDT 
  24959. int myVariable = dup((int) fildes);
  24960.  
  24961. æKY faccessæ
  24962. æDT 
  24963. int myVariablle =faccess((const char *)filename, (unsigned int) cmd, (long *)arg);
  24964.  
  24965. æKY fcntlæ
  24966. æDT 
  24967. int myVaraible = fcntl((int) fildes, (unsigned int) cmd, (int) arg);
  24968.  
  24969. æKY lseekæ
  24970. æDT 
  24971. long myVariable = lseek((int) fildes, (long int) offset, (int) whence);
  24972.  
  24973. æKY openæ
  24974. æDT 
  24975. int myVariable = open((const char *)filename, (int) oflag);
  24976.  
  24977. æKY readæ
  24978. æDT 
  24979. int myVariable = read((int) fildes, (char*) buf, (unsigned long) nbyte);
  24980.  
  24981. æKY unlinkæ
  24982. æDT 
  24983. int myVariable = unlink((const char *)fileName);
  24984.  
  24985.  
  24986. æKY writeæ
  24987. æDT 
  24988. int myVariable = write((int) fildes, (const char*) buf, (unsigned long) nbyte);
  24989.  
  24990.  
  24991. æKY Files.h
  24992. æKL AddDrive
  24993. Allocate
  24994. AllocContig
  24995. CatMove
  24996. CloseWD
  24997. Create
  24998. create
  24999. DirCreate
  25000. Eject
  25001. eject
  25002. FInitQueue
  25003. flushvol
  25004. FlushVol
  25005. FSClose
  25006. FSDelete
  25007. fsdelete
  25008. FSMakeFSSpec
  25009. fsopen
  25010. FSOpen
  25011. FSpCatMove
  25012. FSpCreate
  25013. FSpDelete
  25014. FSpDirCreate
  25015. FSpExchangeFiles
  25016. FSpGetFInfo
  25017. FSpOpenDF
  25018. FSpOpenRF
  25019. FSpRename
  25020. FSpRstFLock
  25021. FSpSetFInfo
  25022. FSpSetFLock
  25023. FSRead
  25024. fsrename
  25025. FSWrite
  25026. GetDrvQHdr
  25027. GetEOF
  25028. GetFInfo
  25029. getfinfo
  25030. GetFPos
  25031. GetFSQHdr
  25032. GetVCBQHdr
  25033. getvinfo
  25034. GetVInfo
  25035. GetVol
  25036. getvol
  25037. GetVRefNum
  25038. GetWDInfo
  25039. HCreate
  25040. HDelete
  25041. HGetFInfo
  25042. HGetVol
  25043. HOpen
  25044. HOpenDF
  25045. HOpenRF
  25046. HRename
  25047. HRstFLock
  25048. HSetFInfo
  25049. HSetFLock
  25050. HSetVol
  25051. OpenDF
  25052. OpenRF
  25053. openrf
  25054. OpenWD
  25055. PBAllocate
  25056. PBAllocateAsync
  25057. PBAllocateSync
  25058. PBAllocContig
  25059. PBAllocContigAsync
  25060. PBAllocContigSync
  25061. PBCatMove
  25062. PBCatMoveAsync
  25063. PBCatMoveSync
  25064. PBCatSearch
  25065. PBCatSearchAsync
  25066. PBCatSearchSync
  25067. PBClose
  25068. PBCloseAsync
  25069. PBCloseSync
  25070. PBCloseWD
  25071. PBCloseWDAsync
  25072. PBCloseWDSync
  25073. PBCreate
  25074. PBCreateAsync
  25075. PBCreateFileIDRef
  25076. PBCreateFileIDRefAsync
  25077. PBCreateFileIDRefSync
  25078. PBCreateSync
  25079. PBDelete
  25080. PBDeleteAsync
  25081. PBDeleteFileIDRef
  25082. PBDeleteFileIDRefAsync
  25083. PBDeleteFileIDRefSync
  25084. PBDeleteSync
  25085. PBDirCreate
  25086. PBDirCreateAsync
  25087. PBDirCreateSync
  25088. PBDTAddAPPL
  25089. PBDTAddAPPLAsync
  25090. PBDTAddAPPLSync
  25091. PBDTAddIcon
  25092. PBDTAddIconAsync
  25093. PBDTAddIconSync
  25094. PBDTCloseDown
  25095. PBDTDelete
  25096. PBDTDeleteAsync
  25097. PBDTDeleteSync
  25098. PBDTFlush
  25099. PBDTFlushAsync
  25100. PBDTFlushSync
  25101. PBDTGetAPPL
  25102. PBDTGetAPPLAsync
  25103. PBDTGetAPPLSync
  25104. PBDTGetComment
  25105. PBDTGetCommentAsync
  25106. PBDTGetCommentSync
  25107. PBDTGetIcon
  25108. PBDTGetIconAsync
  25109. PBDTGetIconInfo
  25110. PBDTGetIconInfoAsync
  25111. PBDTGetIconInfoSync
  25112. PBDTGetIconSync
  25113. PBDTGetInfo
  25114. PBDTGetInfoAsync
  25115. PBDTGetInfoSync
  25116. PBDTGetPath
  25117. PBDTOpenInform
  25118. PBDTRemoveAPPL
  25119. PBDTRemoveAPPLAsync
  25120. PBDTRemoveAPPLSync
  25121. PBDTRemoveComment
  25122. PBDTRemoveCommentAsync
  25123. PBDTRemoveCommentSync
  25124. PBDTReset
  25125. PBDTResetAsync
  25126. PBDTResetSync
  25127. PBDTSetComment
  25128. PBDTSetCommentAsync
  25129. PBDTSetCommentSync
  25130. PBEject
  25131. PBExchangeFiles
  25132. PBExchangeFilesAsync
  25133. PBExchangeFilesSync
  25134. PBFlushFile
  25135. PBFlushFileAsync
  25136. PBFlushFileSync
  25137. PBFlushVol
  25138. PBFlushVolAsync
  25139. PBFlushVolSync
  25140. PBGetAltAccess
  25141. PBGetAltAccessAsync
  25142. PBGetAltAccessSync
  25143. PBGetCatInfo
  25144. PBGetCatInfoAsync
  25145. PBGetCatInfoSync
  25146. PBGetEOF
  25147. PBGetEOFAsync
  25148. PBGetEOFSync
  25149. PBGetFCBInfo
  25150. PBGetFCBInfoAsync
  25151. PBGetFCBInfoSync
  25152. PBGetFInfo
  25153. PBGetFInfoAsync
  25154. PBGetFInfoSync
  25155. PBGetForeignPrivs
  25156. PBGetForeignPrivsAsync
  25157. PBGetForeignPrivsSync
  25158. PBGetFPos
  25159. PBGetFPosAsync
  25160. PBGetFPosSync
  25161. PBGetVInfo
  25162. PBGetVInfoAsync
  25163. PBGetVInfoSync
  25164. PBGetVol
  25165. PBGetVolAsync
  25166. PBGetVolMountInfo
  25167. PBGetVolMountInfoSize
  25168. PBGetVolSync
  25169. PBGetWDInfo
  25170. PBGetWDInfoAsync
  25171. PBGetWDInfoSync
  25172. PBHCopyFile
  25173. PBHCopyFileAsync
  25174. PBHCopyFileSync
  25175. PBHCreate
  25176. PBHCreateAsync
  25177. PBHCreateSync
  25178. PBHDelete
  25179. PBHDeleteAsync
  25180. PBHDeleteSync
  25181. PBHGetDirAccess
  25182. PBHGetDirAccessAsync
  25183. PBHGetDirAccessSync
  25184. PBHGetFInfo
  25185. PBHGetFInfoAsync
  25186. PBHGetFInfoSync
  25187. PBHGetLogInInfo
  25188. PBHGetLogInInfoAsync
  25189. PBHGetLogInInfoSync
  25190. PBHGetVInfo
  25191. PBHGetVInfoAsync
  25192. PBHGetVInfoSync
  25193. PBHGetVol
  25194. PBHGetVolAsync
  25195. PBHGetVolParms
  25196. PBHGetVolParmsAsync
  25197. PBHGetVolParmsSync
  25198. PBHGetVolSync
  25199. PBHMapID
  25200. PBHMapIDAsync
  25201. PBHMapIDSync
  25202. PBHMapName
  25203. PBHMapNameAsync
  25204. PBHMapNameSync
  25205. PBHMoveRename
  25206. PBHMoveRenameAsync
  25207. PBHMoveRenameSync
  25208. PBHOpen
  25209. PBHOpenAsync
  25210. PBHOpenDeny
  25211. PBHOpenDenyAsync
  25212. PBHOpenDenySync
  25213. PBHOpenDF
  25214. PBHOpenDFAsync
  25215. PBHOpenDFSync
  25216. PBHOpenRF
  25217. PBHOpenRFAsync
  25218. PBHOpenRFDeny
  25219. PBHOpenRFDenyAsync
  25220. PBHOpenRFDenySync
  25221. PBHOpenRFSync
  25222. PBHOpenSync
  25223. PBHRename
  25224. PBHRenameAsync
  25225. PBHRenameSync
  25226. PBHRstFLock
  25227. PBHRstFLockAsync
  25228. PBHRstFLockSync
  25229. PBHSetDirAccess
  25230. PBHSetDirAccessAsync
  25231. PBHSetDirAccessSync
  25232. PBHSetFInfo
  25233. PBHSetFInfoAsync
  25234. PBHSetFInfoSync
  25235. PBHSetFLock
  25236. PBHSetFLockAsync
  25237. PBHSetFLockSync
  25238. PBHSetVol
  25239. PBHSetVolAsync
  25240. PBHSetVolSync
  25241. PBLockRange
  25242. PBLockRangeAsync
  25243. PBLockRangeSync
  25244. PBMakeFSSpec
  25245. PBMakeFSSpecAsync
  25246. PBMakeFSSpecSync
  25247. PBMountVol
  25248. PBOffLine
  25249. PBOpen
  25250. PBOpenAsync
  25251. PBOpenDF
  25252. PBOpenDFAsync
  25253. PBOpenDFSync
  25254. PBOpenRF
  25255. PBOpenRFAsync
  25256. PBOpenRFSync
  25257. PBOpenSync
  25258. PBOpenWD
  25259. PBOpenWDAsync
  25260. PBOpenWDSync
  25261. PBRead
  25262. PBReadAsync
  25263. PBReadSync
  25264. PBRename
  25265. PBRenameAsync
  25266. PBRenameSync
  25267. PBResolveFileIDRef
  25268. PBResolveFileIDRefAsync
  25269. PBResolveFileIDRefSync
  25270. PBRstFLock
  25271. PBRstFLockAsync
  25272. PBRstFLockSync
  25273. PBSetAltAccess
  25274. PBSetAltAccessAsync
  25275. PBSetAltAccessSync
  25276. PBSetCatInfo
  25277. PBSetCatInfoAsync
  25278. PBSetCatInfoSync
  25279. PBSetEOF
  25280. PBSetEOFAsync
  25281. PBSetEOFSync
  25282. PBSetFInfo
  25283. PBSetFInfoAsync
  25284. PBSetFInfoSync
  25285. PBSetFLock
  25286. PBSetFLockAsync
  25287. PBSetFLockSync
  25288. PBSetForeignPrivs
  25289. PBSetForeignPrivsAsync
  25290. PBSetForeignPrivsSync
  25291. PBSetFPos
  25292. PBSetFPosAsync
  25293. PBSetFPosSync
  25294. PBSetFVers
  25295. PBSetFVersAsync
  25296. PBSetFVersSync
  25297. PBSetVInfo
  25298. PBSetVInfoAsync
  25299. PBSetVInfoSync
  25300. PBSetVol
  25301. PBSetVolAsync
  25302. PBSetVolSync
  25303. PBUnlockRange
  25304. PBUnlockRangeAsync
  25305. PBUnlockRangeSync
  25306. PBUnmountVol
  25307. PBVolumeMount
  25308. PBWrite
  25309. PBWriteAsync
  25310. PBWriteSync
  25311. Rename
  25312. rstflock
  25313. RstFLock
  25314. SetEOF
  25315. SetFInfo
  25316. setfinfo
  25317. setflock
  25318. SetFLock
  25319. SetFPos
  25320. SetVol
  25321. setvol
  25322. unmountvol
  25323. UnmountVol
  25324.  
  25325. AccessParam
  25326. AFPVolMountInfo
  25327. AFPVolMountInfoPtr
  25328. alphaStage
  25329. AppleShareMediaType
  25330. bAccessCntl
  25331. betaStage
  25332. bHasBlankAccessPrivileges
  25333. bHasBTreeMgr
  25334. bHasCatSearch
  25335. bHasCopyFile
  25336. bHasDesktopMgr
  25337. bHasExtFSVol
  25338. bHasFileIDs
  25339. bHasFolderLock
  25340. bHasMoveRename
  25341. bHasOpenDeny
  25342. bHasPersonalAccessPrivileges
  25343. bHasShortName
  25344. bHasUserGroupList
  25345. bLimitFCBs
  25346. bLocalWList
  25347. bNoBootBlks
  25348. bNoDeskItems
  25349. bNoLclSync
  25350. bNoMiniFndr
  25351. bNoSwitchTo
  25352. bNoSysDir
  25353. bNoVNEdit
  25354. bTrshOffLine
  25355. CatPositionRec
  25356. CInfoPBPtr
  25357. CInfoPBRec
  25358. CInfoType
  25359. CMovePBPtr
  25360. CMovePBRec
  25361. CntrlParam
  25362. CopyParam
  25363. CSParam
  25364. CSParamPtr
  25365. developStage
  25366. DInfo
  25367. DirInfo
  25368. dirInfo
  25369. DrvQEl
  25370. DrvQElPtr
  25371. DTPBPtr
  25372. DTPBRec
  25373. DXInfo
  25374. FCBPBPtr
  25375. FCBPBRec
  25376. fDesktop
  25377. fDisk
  25378. fHasBundle
  25379. FIDParam
  25380. FileParam
  25381. finalStage
  25382. FInfo
  25383. fInvisible
  25384. fOnDesk
  25385. ForeignPrivParam
  25386. ForeignPrivParamPtr
  25387. fsAtMark
  25388. fsCurPerm
  25389. fsFromLEOF
  25390. fsFromMark
  25391. fsFromStart
  25392. fsRdPerm
  25393. fsRdWrPerm
  25394. fsRdWrShPerm
  25395. fsRtDirID
  25396. fsRtParID
  25397. fsSBDrBkDat
  25398. fsSBDrCrDat
  25399. fsSBDrFndrInfo
  25400. fsSBDrMdDat
  25401. fsSBDrNmFls
  25402. fsSBDrParID
  25403. fsSBDrUsrWds
  25404. fsSBFlAttrib
  25405. fsSBFlBkDat
  25406. fsSBFlCrDat
  25407. fsSBFlFndrInfo
  25408. fsSBFlLgLen
  25409. fsSBFlMdDat
  25410. fsSBFlParID
  25411. fsSBFlPyLen
  25412. fsSBFlRLgLen
  25413. fsSBFlRPyLen
  25414. fsSBFlXFndrInfo
  25415. fsSBFullName
  25416. fsSBNegate
  25417. fsSBPartialName
  25418. FSSpec
  25419. FSSpecArray
  25420. FSSpecArrayHandle
  25421. FSSpecArrayPtr
  25422. FSSpecHandle
  25423. FSSpecPtr
  25424. fsUnixPriv
  25425. fsWrPerm
  25426. fTrash
  25427. FXInfo
  25428. GetVolParmsInfoBuffer
  25429. HFileInfo
  25430. hFileInfo
  25431. HFileParam
  25432. HIOParam
  25433. HParamBlockRec
  25434. HParmBlkPtr
  25435. HVolumeParam
  25436. ioDirFlg
  25437. ioDirMask
  25438. IOParam
  25439. kEncryptPassword
  25440. kLarge4BitIcon
  25441. kLarge4BitIconSize
  25442. kLarge8BitIcon
  25443. kLarge8BitIconSize
  25444. kLargeIcon
  25445. kLargeIconSize
  25446. kNoUserAuthentication
  25447. kPassword
  25448. kSmall4BitIcon
  25449. kSmall4BitIconSize
  25450. kSmall8BitIcon
  25451. kSmall8BitIconSize
  25452. kSmallIcon
  25453. kSmallIconSize
  25454. kTwoWayEncryptPassword
  25455. MultiDevParam
  25456. NumVersion
  25457. ObjParam
  25458. ParamBlockHeader
  25459. ParamBlockRec
  25460. ParmBlkPtr
  25461. rdVerify
  25462. SlotDevParam
  25463. VCB
  25464. VersRec
  25465. VersRecHndl
  25466. VersRecPtr
  25467. VolMountInfoHeader
  25468. VolMountInfoPtr
  25469. VolumeParam
  25470. VolumeType
  25471. WDParam
  25472. WDPBPtr
  25473. WDPBRec
  25474.  
  25475. æKY fsAtMark
  25476. æFc Files.h
  25477. æT 
  25478. æD     fsAtMark = 0,
  25479. æC 
  25480. IOPosMode and ioPosOffset specify the position of the mark for Read, Write, LockRng,
  25481. UnlockRng, and SetFPos calls. IOPosMode contains the positioning mode; bits 0 and 1
  25482. indicate how to position the mark, and you can use the following predefined constants
  25483. to set or test their value:
  25484.  
  25485. #define  fsAtMark     0    /*at current mark*/
  25486. #define  fsFromStart  1    /*set mark relative to beginning of file*/
  25487. #define  fsFromLEOF   2    /*set mark relative to logical end-of-file*/
  25488. #define  fsFromMark   3    /*set mark relative to current mark*/
  25489.  
  25490. If you specify fsAtMark, ioPosOffset is ignored and the operation begins wherever the
  25491. mark is currently positioned. If you choose to set the mark
  25492. (relative to either the beginning of the file, the logical end-of-file, or the current
  25493. mark), ioPosOffset must specify the byte offset from the chosen point
  25494. (either positive or negative) where the operation should begin.
  25495.  
  25496. Note:  Advanced programmers:  Bit 7 of ioPosMode is the newline flag; it’s
  25497.        set if read operations should terminate at a newline character. The
  25498.        ASCII code of the newline character is specified in the high-order
  25499.        byte of ioPosMode. If the newline flag is set, the data will be read
  25500.        one byte at a time until the newline character is encountered,
  25501.        ioReqCount bytes have been read, or the end-of-file is reached. If
  25502.        the newline flag is clear, the data will be read one byte at a time
  25503.        until ioReqCount bytes have been read or the end-of-file is reached.
  25504.  
  25505. æKY fOnDesk
  25506. æFc Files.h
  25507. æT 
  25508. æD     fOnDesk = 1,
  25509. æC 
  25510.  
  25511. æKY fsCurPerm
  25512. æFc Files.h
  25513. æT 
  25514. æD     fsCurPerm = 0,
  25515. æC 
  25516. IOPermssn requests permission to read or write via an access path, and must contain
  25517. one of the following values:
  25518.  
  25519. #define  fsCurPerm      0    /*whatever is currently allowed*/
  25520. #define  fsRdPerm       1    /*request for read permission only*/
  25521. #define  fsWrPerm       2    /*request for write permission*/
  25522. #define  fsRdWrPerm     3    /*request for exclusive read/write permission*/
  25523. #define  fsRdWrShPerm   4    /*request for shared read/write permission*/
  25524.  
  25525. This request is compared with the open permission of the file. If the open permission
  25526. doesn’t allow I/O as requested, a result code indicating the error is returned.
  25527.  
  25528. Warning:  To ensure data integrity be sure to lock the portion of the
  25529.           file you’ll be using if you specify shared write permission.
  25530.  
  25531. æKY fHasBundle
  25532. æFc Files.h
  25533. æT 
  25534. æD     fHasBundle = 8192,
  25535. æC 
  25536.  
  25537. æKY fsRdPerm
  25538. æFc Files.h
  25539. æT 
  25540. æD     fsRdPerm = 1,
  25541. æC 
  25542.  
  25543. æKY fInvisible
  25544. æFc Files.h
  25545. æT 
  25546. æD     fInvisible = 16384,
  25547. æC 
  25548.  
  25549. æKY fTrash
  25550. æFc Files.h
  25551. æT 
  25552. æD     fTrash = -3,
  25553. æC 
  25554.  
  25555. æKY fsWrPerm
  25556. æFc Files.h
  25557. æT 
  25558. æD     fsWrPerm = 2,
  25559. æC 
  25560.  
  25561. æKY fDesktop
  25562. æFc Files.h
  25563. æT 
  25564. æD     fDesktop = -2,
  25565. æC 
  25566.  
  25567. æKY fsRdWrPerm
  25568. æFc Files.h
  25569. æT 
  25570. æD     fsRdWrPerm = 3,
  25571. æC 
  25572.  
  25573. æKY fDisk
  25574. æFc Files.h
  25575. æT 
  25576. æD     fDisk = 0,
  25577. æC 
  25578.  
  25579. æKY fsRdWrShPerm
  25580. æFc Files.h
  25581. æT 
  25582. æD     fsRdWrShPerm = 4,
  25583. æC 
  25584.  
  25585. æKY fsFromStart
  25586. æFc Files.h
  25587. æT 
  25588. æD     fsFromStart = 1,
  25589. æC 
  25590.  
  25591. æKY fsFromLEOF
  25592. æFc Files.h
  25593. æT 
  25594. æD     fsFromLEOF = 2,
  25595. æC 
  25596.  
  25597. æKY fsFromMark
  25598. æFc Files.h
  25599. æT 
  25600. æD     fsFromMark = 3,
  25601. æC 
  25602.  
  25603. æKY rdVerify
  25604. æFc Files.h
  25605. æT 
  25606. æD     rdVerify = 64,
  25607. æC To have the File Manager verify that all data written to a volume exactly matches the
  25608. data in memory, make a Read call right after the Write call. The parameters for a
  25609. read-verify operation are the same as for a standard Read call, except that the
  25610. following constant must be added to the positioning mode:
  25611.  
  25612. #define rdVerify 64    /*read-verify mode*/
  25613.  
  25614. The result code ioErr is returned if any of the data doesn’t match.
  25615.  
  25616. æKY ioDirFlg
  25617. æFc Files.h
  25618. æT 
  25619. æD     ioDirFlg = 3, /*see IM IV-125*/
  25620. æC 
  25621.  
  25622. æKY ioDirMask
  25623. æFc Files.h
  25624. æT 
  25625. æD     ioDirMask = 0x10,
  25626. æC 
  25627.  
  25628. æKY fsRtParID
  25629. æFc Files.h
  25630. æT 
  25631. æD     fsRtParID = 1,
  25632. æC 
  25633.  
  25634. æKY fsRtDirID
  25635. æFc Files.h
  25636. æT 
  25637. æD     fsRtDirID = 2,
  25638. æC 
  25639.  
  25640. æKY fsSBPartialName
  25641. æFc Files.h
  25642. æT 
  25643. æD     fsSBPartialName = 1,
  25644. æC 
  25645.  
  25646. æKY fsSBFullName
  25647. æFc Files.h
  25648. æT 
  25649. æD     fsSBFullName = 2,
  25650. æC 
  25651.  
  25652. æKY fsSBFlAttrib
  25653. æFc Files.h
  25654. æT 
  25655. æD     fsSBFlAttrib = 4,
  25656. æC 
  25657.  
  25658. æKY fsSBFlFndrInfo
  25659. æFc Files.h
  25660. æT 
  25661. æD     fsSBFlFndrInfo = 8,
  25662. æC 
  25663.  
  25664. æKY fsSBFlLgLen
  25665. æFc Files.h
  25666. æT 
  25667. æD     fsSBFlLgLen = 32,
  25668. æC 
  25669.  
  25670. æKY fsSBFlPyLen
  25671. æFc Files.h
  25672. æT 
  25673. æD     fsSBFlPyLen = 64,
  25674. æC 
  25675.  
  25676. æKY fsSBFlRLgLen
  25677. æFc Files.h
  25678. æT 
  25679. æD     fsSBFlRLgLen = 128,
  25680. æC 
  25681.  
  25682. æKY fsSBFlRPyLen
  25683. æFc Files.h
  25684. æT 
  25685. æD     fsSBFlRPyLen = 256,
  25686. æC 
  25687.  
  25688. æKY fsSBFlCrDat
  25689. æFc Files.h
  25690. æT 
  25691. æD     fsSBFlCrDat = 512,
  25692. æC 
  25693.  
  25694. æKY fsSBFlMdDat
  25695. æFc Files.h
  25696. æT 
  25697. æD     fsSBFlMdDat = 1024,
  25698. æC 
  25699.  
  25700. æKY fsSBFlBkDat
  25701. æFc Files.h
  25702. æT 
  25703. æD     fsSBFlBkDat = 2048,
  25704. æC 
  25705.  
  25706. æKY fsSBFlXFndrInfo
  25707. æFc Files.h
  25708. æT 
  25709. æD     fsSBFlXFndrInfo = 4096,
  25710. æC 
  25711.  
  25712. æKY fsSBFlParID
  25713. æFc Files.h
  25714. æT 
  25715. æD     fsSBFlParID = 8192,
  25716. æC 
  25717.  
  25718. æKY fsSBNegate
  25719. æFc Files.h
  25720. æT 
  25721. æD     fsSBNegate = 16384,
  25722. æC 
  25723.  
  25724. æKY fsSBDrUsrWds
  25725. æFc Files.h
  25726. æT 
  25727. æD     fsSBDrUsrWds = 8,
  25728. æC 
  25729.  
  25730. æKY fsSBDrNmFls
  25731. æFc Files.h
  25732. æT 
  25733. æD     fsSBDrNmFls = 16,
  25734. æC 
  25735.  
  25736. æKY fsSBDrCrDat
  25737. æFc Files.h
  25738. æT 
  25739. æD     fsSBDrCrDat = 512,
  25740. æC 
  25741.  
  25742. æKY fsSBDrMdDat
  25743. æFc Files.h
  25744. æT 
  25745. æD     fsSBDrMdDat = 1024,
  25746. æC 
  25747.  
  25748. æKY fsSBDrBkDat
  25749. æFc Files.h
  25750. æT 
  25751. æD     fsSBDrBkDat = 2048,
  25752. æC 
  25753.  
  25754. æKY fsSBDrFndrInfo
  25755. æFc Files.h
  25756. æT 
  25757. æD     fsSBDrFndrInfo = 4096,
  25758. æC 
  25759.  
  25760. æKY fsSBDrParID
  25761. æFc Files.h
  25762. æT 
  25763. æD     fsSBDrParID = 8192,
  25764. æC 
  25765.  
  25766. æKY bLimitFCBs
  25767. æFc Files.h
  25768. æT 
  25769. æD     bLimitFCBs = 31,
  25770. æC 
  25771.  
  25772. æKY bLocalWList
  25773. æFc Files.h
  25774. æT 
  25775. æD     bLocalWList = 30,
  25776. æC 
  25777.  
  25778. æKY bNoMiniFndr
  25779. æFc Files.h
  25780. æT 
  25781. æD     bNoMiniFndr = 29,
  25782. æC 
  25783.  
  25784. æKY bNoVNEdit
  25785. æFc Files.h
  25786. æT 
  25787. æD     bNoVNEdit = 28,
  25788. æC 
  25789.  
  25790. æKY bNoLclSync
  25791. æFc Files.h
  25792. æT 
  25793. æD     bNoLclSync = 27,
  25794. æC 
  25795.  
  25796. æKY bTrshOffLine
  25797. æFc Files.h
  25798. æT 
  25799. æD     bTrshOffLine = 26,
  25800. æC 
  25801.  
  25802. æKY bNoSwitchTo
  25803. æFc Files.h
  25804. æT 
  25805. æD     bNoSwitchTo = 25,
  25806. æC 
  25807.  
  25808. æKY bNoDeskItems
  25809. æFc Files.h
  25810. æT 
  25811. æD     bNoDeskItems = 20,
  25812. æC 
  25813.  
  25814. æKY bNoBootBlks
  25815. æFc Files.h
  25816. æT 
  25817. æD     bNoBootBlks = 19,
  25818. æC 
  25819.  
  25820. æKY bAccessCntl
  25821. æFc Files.h
  25822. æT 
  25823. æD     bAccessCntl = 18,
  25824. æC 
  25825.  
  25826. æKY bNoSysDir
  25827. æFc Files.h
  25828. æT 
  25829. æD     bNoSysDir = 17,
  25830. æC 
  25831.  
  25832. æKY bHasExtFSVol
  25833. æFc Files.h
  25834. æT 
  25835. æD     bHasExtFSVol = 16,
  25836. æC 
  25837.  
  25838. æKY bHasOpenDeny
  25839. æFc Files.h
  25840. æT 
  25841. æD     bHasOpenDeny = 15,
  25842. æC 
  25843.  
  25844. æKY bHasCopyFile
  25845. æFc Files.h
  25846. æT 
  25847. æD     bHasCopyFile = 14,
  25848. æC 
  25849.  
  25850. æKY bHasMoveRename
  25851. æFc Files.h
  25852. æT 
  25853. æD     bHasMoveRename = 13,
  25854. æC 
  25855.  
  25856. æKY bHasDesktopMgr
  25857. æFc Files.h
  25858. æT 
  25859. æD     bHasDesktopMgr = 12,
  25860. æC 
  25861.  
  25862. æKY bHasShortName
  25863. æFc Files.h
  25864. æT 
  25865. æD     bHasShortName = 11,
  25866. æC 
  25867.  
  25868. æKY bHasFolderLock
  25869. æFc Files.h
  25870. æT 
  25871. æD     bHasFolderLock = 10,
  25872. æC 
  25873.  
  25874. æKY bHasPersonalAccessPrivileges
  25875. æFc Files.h
  25876. æT 
  25877. æD     bHasPersonalAccessPrivileges = 9,
  25878. æC 
  25879.  
  25880. æKY bHasUserGroupList
  25881. æFc Files.h
  25882. æT 
  25883. æD     bHasUserGroupList = 8,
  25884. æC 
  25885.  
  25886. æKY bHasCatSearch
  25887. æFc Files.h
  25888. æT 
  25889. æD     bHasCatSearch = 7,
  25890. æC 
  25891.  
  25892. æKY bHasFileIDs
  25893. æFc Files.h
  25894. æT 
  25895. æD     bHasFileIDs = 6,
  25896. æC 
  25897.  
  25898. æKY bHasBTreeMgr
  25899. æFc Files.h
  25900. æT 
  25901. æD     bHasBTreeMgr = 5,
  25902. æC 
  25903.  
  25904. æKY bHasBlankAccessPrivileges
  25905. æFc Files.h
  25906. æT 
  25907. æD     bHasBlankAccessPrivileges = 4,
  25908. æC 
  25909.  
  25910. æKY kLargeIcon
  25911. æFc Files.h
  25912. æT 
  25913. æD     kLargeIcon = 1,
  25914. æC 
  25915.  
  25916. æKY kLarge4BitIcon
  25917. æFc Files.h
  25918. æT 
  25919. æD     kLarge4BitIcon = 2,
  25920. æC 
  25921.  
  25922. æKY kLarge8BitIcon
  25923. æFc Files.h
  25924. æT 
  25925. æD     kLarge8BitIcon = 3,
  25926. æC 
  25927.  
  25928. æKY kSmallIcon
  25929. æFc Files.h
  25930. æT 
  25931. æD     kSmallIcon = 4,
  25932. æC 
  25933.  
  25934. æKY kSmall4BitIcon
  25935. æFc Files.h
  25936. æT 
  25937. æD     kSmall4BitIcon = 5,
  25938. æC 
  25939.  
  25940. æKY kSmall8BitIcon
  25941. æFc Files.h
  25942. æT 
  25943. æD     kSmall8BitIcon = 6,
  25944. æC 
  25945.  
  25946. æKY kLargeIconSize
  25947. æFc Files.h
  25948. æT 
  25949. æD     kLargeIconSize = 256,
  25950. æC 
  25951.  
  25952. æKY kLarge4BitIconSize
  25953. æFc Files.h
  25954. æT 
  25955. æD     kLarge4BitIconSize = 512,
  25956. æC 
  25957.  
  25958. æKY kLarge8BitIconSize
  25959. æFc Files.h
  25960. æT 
  25961. æD     kLarge8BitIconSize = 1024,
  25962. æC 
  25963.  
  25964. æKY kSmallIconSize
  25965. æFc Files.h
  25966. æT 
  25967. æD     kSmallIconSize = 64,
  25968. æC 
  25969.  
  25970. æKY kSmall4BitIconSize
  25971. æFc Files.h
  25972. æT 
  25973. æD     kSmall4BitIconSize = 128,
  25974. æC 
  25975.  
  25976. æKY kSmall8BitIconSize
  25977. æFc Files.h
  25978. æT 
  25979. æD     kSmall8BitIconSize = 256,
  25980. æC 
  25981.  
  25982. æKY fsUnixPriv
  25983. æFc Files.h
  25984. æT 
  25985. æD     fsUnixPriv = 1,
  25986. æC 
  25987.  
  25988. æKY developStage
  25989. æFc Files.h
  25990. æT 
  25991. æD     developStage = 0x20,
  25992. æC 
  25993.  
  25994. æKY alphaStage
  25995. æFc Files.h
  25996. æT 
  25997. æD     alphaStage = 0x40,
  25998. æC 
  25999.  
  26000. æKY betaStage
  26001. æFc Files.h
  26002. æT 
  26003. æD     betaStage = 0x60,
  26004. æC 
  26005.  
  26006. æKY finalStage
  26007. æFc Files.h
  26008. æT 
  26009. æD     finalStage = 0x80,
  26010. æC 
  26011.  
  26012. æKY kNoUserAuthentication
  26013. æFc Files.h
  26014. æT 
  26015. æD     kNoUserAuthentication = 1,
  26016. æC 
  26017.  
  26018. æKY kPassword
  26019. æFc Files.h
  26020. æT 
  26021. æD     kPassword = 2,
  26022. æC 
  26023.  
  26024. æKY kEncryptPassword
  26025. æFc Files.h
  26026. æT 
  26027. æD     kEncryptPassword = 3,
  26028. æC 
  26029.  
  26030. æKY kTwoWayEncryptPassword
  26031. æFc Files.h
  26032. æT 
  26033. æD     kTwoWayEncryptPassword = 6,
  26034. æC 
  26035.  
  26036. æKY CInfoType
  26037. hFileInfo
  26038. dirInfo
  26039. æFc Files.h
  26040. æT enum
  26041. æD enum {hFileInfo,dirInfo};
  26042. typedef unsigned char CInfoType;
  26043. æC 
  26044.  
  26045. æKY FInfo
  26046. æFc Files.h
  26047. æT struct
  26048. æD struct FInfo {
  26049.     OSType fdType; /*the type of the file*/
  26050.     OSType fdCreator; /*file's creator*/
  26051.     unsigned short fdFlags; /*flags ex. hasbundle,invisible,locked, etc.*/
  26052.     Point fdLocation; /*file's location in folder*/
  26053.     short fdFldr; /*folder containing file*/
  26054. };
  26055.  
  26056. typedef struct FInfo FInfo;
  26057. æC 
  26058.  
  26059. æKY FXInfo
  26060. æFc Files.h
  26061. æT struct
  26062. æD struct FXInfo {
  26063.     short fdIconID; /* Icon ID*/
  26064.     short fdUnused[3]; /*unused but reserved 6 bytes*/
  26065.     char fdScript; /* Script flag and number */
  26066.     char fdXFlags;
  26067.     short fdComment; /* Comment ID*/
  26068.     long fdPutAway; /* Home Dir ID*/
  26069. };
  26070.  
  26071. typedef struct FXInfo FXInfo;
  26072. æC 
  26073.  
  26074. On hierarchical volumes, in addition to the FInfo record, the following information
  26075. about files is maintained for the Finder:
  26076.  
  26077. æKY DInfo
  26078. æFc Files.h
  26079. æT struct
  26080. æD struct DInfo {
  26081.     Rect frRect; /*folder rect*/
  26082.     unsigned short frFlags; /*Flags*/
  26083.     Point frLocation; /*folder location*/
  26084.     short frView; /*folder view*/
  26085. };
  26086.  
  26087. typedef struct DInfo DInfo;
  26088. æC 
  26089.  
  26090. On hierarchical volumes, the following information about directories is maintained
  26091. for the Finder:
  26092.  
  26093. DInfo = RECORD
  26094.           frRect:      Rect;       {folder's rectangle}
  26095.           frFlags:     INTEGER;    {flags}
  26096.           frLocation:  Point;      {folder's location}
  26097.           frView:      INTEGER;    {folder's view}
  26098.         END;
  26099.  
  26100. DXInfo = RECORD
  26101.            frScroll:     Point;      {scroll position}
  26102.            frOpenChain:  LONGINT;    {directory ID chain of open folders}
  26103.            frUnused:     INTEGER;    {reserved}
  26104.            frComment:    INTEGER;    {comment ID}
  26105.            frPutAway:    LONGINT;    {directory ID}
  26106.          END;
  26107.  
  26108. When a file (or folder) is moved to the desktop on a hierarchical volume, it’s actually
  26109. moved to the root level of the file directory. (This permits all the desktop icons to
  26110. be enumerated by one simple scan of the root.) The fOnDesk bit of fdFlags is set.
  26111. FDPutAway (or frPutAway for directories) contains the directory ID of the folder that
  26112. originally contained the file (or folder); this allows the file (or folder) to be
  26113. returned there from the desktop.
  26114.  
  26115. æKY DXInfo
  26116. æFc Files.h
  26117. æT struct
  26118. æD struct DXInfo {
  26119.     Point frScroll; /*scroll position*/
  26120.     long frOpenChain; /*DirID chain of open folders*/
  26121.     char frScript; /* Script flag and number */
  26122.     char frXFlags;
  26123.     short frComment; /*comment*/
  26124.     long frPutAway; /*DirID*/
  26125. };
  26126.  
  26127. typedef struct DXInfo DXInfo;
  26128. æC 
  26129.  
  26130. æKY GetVolParmsInfoBuffer
  26131. æFc Files.h
  26132. æT struct
  26133. æD struct GetVolParmsInfoBuffer {
  26134.     short vMVersion; /*version number*/
  26135.     long vMAttrib; /*bit vector of attributes (see vMAttrib constants)*/
  26136.     Handle vMLocalHand; /*handle to private data*/
  26137.     long vMServerAdr; /*AppleTalk server address or zero*/
  26138.     long vMVolumeGrade; /*approx. speed rating or zero if unrated*/
  26139.     short vMForeignPrivID; /*foreign privilege model supported or zero if none*/
  26140. };
  26141.  
  26142. typedef struct GetVolParmsInfoBuffer GetVolParmsInfoBuffer;
  26143. æC 
  26144.  
  26145. æKY ParamBlockHeader
  26146. æFc Files.h
  26147. æT struct
  26148. æD #define ParamBlockHeader \
  26149.     QElemPtr qLink;                 /*queue link in header*/\
  26150.     short qType;                    /*type byte for safety check*/\
  26151.     short ioTrap;                    /*FS: the Trap*/\
  26152.     Ptr ioCmdAddr;                    /*FS: address to dispatch to*/\
  26153.     ProcPtr ioCompletion;            /*completion routine addr (0 for synch calls)*/\
  26154.     OSErr ioResult;                 /*result code*/\
  26155.     StringPtr ioNamePtr;            /*ptr to Vol:FileName string*/\
  26156.     short ioVRefNum;                /*volume refnum (DrvNum for Eject and MountVol)*/
  26157.  
  26158. æC 
  26159.  
  26160. æKY IOParam
  26161. æFc Files.h
  26162. æT struct
  26163. æD struct IOParam {
  26164.     ParamBlockHeader 
  26165.     short ioRefNum; /*refNum for I/O operation*/
  26166.     char ioVersNum; /*version number*/
  26167.     char ioPermssn; /*Open: permissions (byte)*/
  26168.     Ptr ioMisc; /*Rename: new name (GetEOF,SetEOF: logical end of file) (Open: optional ptr to buffer) (SetFileType: new type)*/
  26169.     Ptr ioBuffer; /*data buffer Ptr*/
  26170.     long ioReqCount; /*requested byte count; also = ioNewDirID*/
  26171.     long ioActCount; /*actual byte count completed*/
  26172.     short ioPosMode; /*initial file positioning*/
  26173.     long ioPosOffset; /*file position offset*/
  26174. };
  26175.  
  26176. typedef struct IOParam IOParam;
  26177. æC 
  26178.  
  26179. æKY FileParam
  26180. æFc Files.h
  26181. æT struct
  26182. æD struct FileParam {
  26183.     ParamBlockHeader 
  26184.     short ioFRefNum; /*reference number*/
  26185.     char ioFVersNum; /*version number*/
  26186.     char filler1;
  26187.     short ioFDirIndex; /*GetFInfo directory index*/
  26188.     unsigned char ioFlAttrib; /*GetFInfo: in-use bit=7, lock bit=0*/
  26189.     unsigned char ioFlVersNum; /*file version number*/
  26190.     FInfo ioFlFndrInfo; /*user info*/
  26191.     unsigned long ioFlNum; /*GetFInfo: file number; TF- ioDirID*/
  26192.     unsigned short ioFlStBlk; /*start file block (0 if none)*/
  26193.     long ioFlLgLen; /*logical length (EOF)*/
  26194.     long ioFlPyLen; /*physical length*/
  26195.     unsigned short ioFlRStBlk; /*start block rsrc fork*/
  26196.     long ioFlRLgLen; /*file logical length rsrc fork*/
  26197.     long ioFlRPyLen; /*file physical length rsrc fork*/
  26198.     unsigned long ioFlCrDat; /*file creation date& time (32 bits in secs)*/
  26199.     unsigned long ioFlMdDat; /*last modified date and time*/
  26200. };
  26201.  
  26202. typedef struct FileParam FileParam;
  26203. æC 
  26204.  
  26205. æKY VolumeParam
  26206. æFc Files.h
  26207. æT struct
  26208. æD struct VolumeParam {
  26209.     ParamBlockHeader 
  26210.     long filler2;
  26211.     short ioVolIndex; /*volume index number*/
  26212.     unsigned long ioVCrDate; /*creation date and time*/
  26213.     unsigned long ioVLsBkUp; /*last backup date and time*/
  26214.     unsigned short ioVAtrb; /*volume attrib*/
  26215.     unsigned short ioVNmFls; /*number of files in directory*/
  26216.     unsigned short ioVDirSt; /*start block of file directory*/
  26217.     short ioVBlLn; /*GetVolInfo: length of dir in blocks*/
  26218.     unsigned short ioVNmAlBlks; /*GetVolInfo: num blks (of alloc size)*/
  26219.     long ioVAlBlkSiz; /*GetVolInfo: alloc blk byte size*/
  26220.     long ioVClpSiz; /*GetVolInfo: bytes to allocate at a time*/
  26221.     unsigned short ioAlBlSt; /*starting disk(512-byte) block in block map*/
  26222.     unsigned long ioVNxtFNum; /*GetVolInfo: next free file number*/
  26223.     unsigned short ioVFrBlk; /*GetVolInfo: # free alloc blks for this vol*/
  26224. };
  26225.  
  26226. typedef struct VolumeParam VolumeParam;
  26227. æC 
  26228.  
  26229. æKY CntrlParam
  26230. æFc Files.h
  26231. æT struct
  26232. æD struct CntrlParam {
  26233.     QElem *qLink; /*queue link in header*/
  26234.     short qType; /*type byte for safety check*/
  26235.     short ioTrap; /*FS: the Trap*/
  26236.     Ptr ioCmdAddr; /*FS: address to dispatch to*/
  26237.     ProcPtr ioCompletion; /*completion routine addr (0 for synch calls)*/
  26238.     OSErr ioResult; /*result code*/
  26239.     StringPtr ioNamePtr; /*ptr to Vol:FileName string*/
  26240.     short ioVRefNum; /*volume refnum (DrvNum for Eject and MountVol)*/
  26241.     short ioCRefNum; /*refNum for I/O operation*/
  26242.     short csCode; /*word for control status code*/
  26243.     short csParam[11]; /*operation-defined parameters*/
  26244. };
  26245.  
  26246. typedef struct CntrlParam CntrlParam;
  26247. æC 
  26248.  
  26249. æKY SlotDevParam
  26250. æFc Files.h
  26251. æT struct
  26252. æD struct SlotDevParam {
  26253.     ParamBlockHeader 
  26254.     short ioRefNum;
  26255.     char ioVersNum;
  26256.     char ioPermssn;
  26257.     Ptr ioMix;
  26258.     short ioFlags;
  26259.     char ioSlot;
  26260.     char ioID;
  26261. };
  26262.  
  26263. typedef struct SlotDevParam SlotDevParam;
  26264. æC 
  26265.  
  26266. æKY MultiDevParam
  26267. æFc Files.h
  26268. æT struct
  26269. æD struct MultiDevParam {
  26270.     ParamBlockHeader 
  26271.     short ioRefNum;
  26272.     char ioVersNum;
  26273.     char ioPermssn;
  26274.     Ptr ioMix;
  26275.     short ioFlags;
  26276.     Ptr ioSEBlkPtr;
  26277. };
  26278.  
  26279. typedef struct MultiDevParam MultiDevParam;
  26280. æC 
  26281.  
  26282. æKY ParamBlockRec
  26283. ParmBlkPtr
  26284. æFc Files.h
  26285. æT struct
  26286. æD union ParamBlockRec {
  26287.     IOParam ioParam;
  26288.     FileParam fileParam;
  26289.     VolumeParam volumeParam;
  26290.     CntrlParam cntrlParam;
  26291.     SlotDevParam slotDevParam;
  26292.     MultiDevParam multiDevParam;
  26293. };
  26294.  
  26295. typedef union ParamBlockRec ParamBlockRec;
  26296. typedef ParamBlockRec *ParmBlkPtr;
  26297. æC »FileParam Variant ( ParamBlockRec and HParamBlockRec)
  26298.  
  26299. The fileParam variants of ParamBlockRec and HParamBlockRec are identical, with one
  26300. exception:  The field ioDirID in HParamBlockRec is called ioFlNum in ParamBlockRec.
  26301. The fields of the fileParam variant of HParamBlockRec are as follows:  
  26302.  
  26303. •••Refer to Technical Note #204:•••
  26304.  
  26305.   fileParam:
  26306.    (ioFRefNum:     INTEGER;     {path reference number}
  26307.     ioFVersNum:    SignedByte;  {version number}
  26308.     filler1:       SignedByte;  {not used}
  26309.     ioFDirIndex:   INTEGER;     {index}
  26310.     ioFlAttrib:    SignedByte;  {file attributes}
  26311.     ioFlVersNum:   SignedByte;  {version number}
  26312.     ioFlFndrInfo:  FInfo;       {information used by the Finder}
  26313.     ioDirID:       LONGINT;     {directory ID or file number}
  26314.     ioFlStBlk:     INTEGER;     {first allocation block of data fork}
  26315.     ioFlLgLen:     LONGINT;     {logical end-of-file of data fork}
  26316.     ioFlPyLen:     LONGINT;     {physical end-of-file of data fork}
  26317.     ioFlRStBlk:    INTEGER;     {first allocation block of resource fork}
  26318.     ioFlRLgLen:    LONGINT;     {logical end-of-file of resource fork}
  26319.     ioFlRPyLen:    LONGINT;     {physical end-of-file of resource fork}
  26320.     ioFlCrDat:     LONGINT;     {date and time of creation}
  26321.     ioFlMdDat:     LONGINT);    {date and time of last modification}
  26322.  
  26323. IOFDirIndex can be used with the PBGetFInfo and PBHGetFInfo to index through the
  26324. files in a given directory.
  26325.  
  26326. Warning:  When used with GetFileInfo, ioFDirIndex will index only the files
  26327.           in a directory. To index both files and directories, you can use
  26328.           ioFDirIndex with PBGetCatInfo.
  26329.  
  26330. IOFlAttrib contains the following file attributes:
  26331.  
  26332.   Bit    Meaning
  26333.  
  26334.    0     Set if file is locked
  26335.    2     Set if resource fork is open
  26336.    3     Set if data fork is open
  26337.    4     Set if a directory
  26338.    7     Set if file (either fork) is open
  26339.  
  26340. When passed to a routine, ioDirID contains a directory ID; it can be used to refer to
  26341. a directory or, in conjuction with a partial pathname from that directory, to other
  26342. files and directories. If both a directory ID and a working directory reference
  26343. number are provided, the directory ID is used to identify the directory on the volume
  26344. indicated by the working directory reference number. In other words, a directory ID
  26345. specified by the caller will override the working directory referred to by the working
  26346. directory reference number. If you don’t want this to happen, you can set ioDirID to
  26347. 0. (If no directory is specified through a working directory reference number, the
  26348. root directory ID will be used.)
  26349.  
  26350. When returned from a routine, ioDirID contains the file number of a file; most programmers
  26351. needn’t be concerned with file numbers, but those interested can read the section
  26352. “Data Organization on Volumes”.
  26353.  
  26354. IOFlStBlk and ioFlRStBlk contain 0 if the file’s data or resource fork is empty,
  26355. respectively; they’re used only with flat volumes. The date and time in the ioFlCrDat
  26356. and ioFlMdDat fields are specified in seconds since midnight,
  26357. January 1, 1904.
  26358.  
  26359. »VolumeParam Variant (ParamBlockRec)
  26360.  
  26361. When you call GetVolInfo, you’ll use the volumeParam variant of ParamBlockRec:
  26362.  
  26363.   volumeParam:
  26364.    (filler2:      LONGINT;    {not used}
  26365.     ioVolIndex:   INTEGER;    {index}
  26366.     ioVCrDate:    LONGINT;    {date and time of initialization}
  26367.     ioVLsBkUp:    LONGINT;    {date and time of last modification}
  26368.     ioVAtrb:      INTEGER;    {volume attributes}
  26369.     ioVNmFls:     INTEGER;    {number of files in root directory}
  26370.     ioVDirSt:     INTEGER;    {first block of directory}
  26371.     ioVBlLn:      INTEGER;    {length of directory in blocks}
  26372.     ioVNmAlBlks:  INTEGER;    {number of allocation blocks}
  26373.     ioVAlBlkSiz:  LONGINT;    {size of allocation blocks}
  26374.     ioVClpSiz:    LONGINT;    {number of bytes to allocate}
  26375.     ioAlBlSt:     INTEGER;    {first block in volume block map}
  26376.     ioVNxtFNum:   LONGINT;    {next unused file number}
  26377.     ioVFrBlk:     INTEGER);   {number of unused allocation blocks}
  26378.  
  26379. IOVolIndex can be used to index through all the mounted volumes; using an index of 1
  26380. accesses the first volume mounted, and so on. (For more information on indexing, see
  26381. the section “Indexing” above.)
  26382.  
  26383. IOVLsBkUp contains the date and time the volume information was last modified
  26384. (this is not necessarily when it was flushed). (This field is not modified when
  26385. information is written to a file.)
  26386.  
  26387. Note:  The name ioVLsBkUp is actually a misnomer; this field has always
  26388.        contained the date and time of the last modification to the volume,
  26389.        not the last backup.
  26390.  
  26391. Most programmers needn’t be concerned with the remaining parameters, but interested
  26392. programmers can read the section “Data Organization on Volumes”.
  26393.  
  26394. »VolumeParam Variant (HParamBlockRec)
  26395.  
  26396. When you call HGetVInfo and SetVolInfo, you’ll use the volumeParam variant of HParamBlockRec.
  26397. This is a superset of the volumeParam variant of ParamBlockRec; the names and functions
  26398. of certain fields have been changed, and new fields have been added:
  26399.  
  26400.   volumeParam:
  26401.    (filler2:      LONGINT;    {not used}
  26402.     ioVolIndex:   INTEGER;    {index}
  26403.     ioVCrDate:    LONGINT;    {date and time of initialization}
  26404.     ioVLsMod:     LONGINT;    {date and time of last modification}
  26405.     ioVAtrb:      INTEGER;    {volume attributes}
  26406.     ioVNmFls:     INTEGER;    {number of files in root directory}
  26407.     ioVBitMap:    INTEGER;    {first block of volume bit map}
  26408.     ioAllocPtr:   INTEGER;    {block at which next new file starts}
  26409.     ioVNmAlBlks:  INTEGER;    {number of allocation blocks}
  26410.     ioVAlBlkSiz:  LONGINT;    {size of allocation blocks}
  26411.     ioVClpSiz:    LONGINT;    {number of bytes to allocate}
  26412.     ioAlBlSt:     INTEGER;    {first block in volume block map}
  26413.     ioVNxtCNID:   LONGINT;    {next unused file number}
  26414.     ioVFrBlk:     INTEGER;    {number of unused allocation blocks}
  26415.     ioVSigWord:   INTEGER;    {volume signature}
  26416.     ioVDrvInfo:   INTEGER;    {drive number}
  26417.     ioVDRefNum:   INTEGER;    {driver reference number}
  26418.     ioVFSID:      INTEGER;    {file system handling this volume}
  26419.     ioVBkUp:      LONGINT;    {date and time of last backup}
  26420.     ioVSeqNum:    INTEGER;    {used internally}
  26421.     ioVWrCnt      LONGINT;    {volume write count}
  26422.     ioVFilCnt:    LONGINT;    {number of files on volume}
  26423.     ioVDirCnt:    LONGINT;    {number of directories on volume}
  26424.     ioVFndrInfo:  ARRAY[1..8] OF LONGINT); {information used by the Finder}
  26425.  
  26426. IOVolIndex can be used to index through all the mounted volumes; using an index of 1
  26427. accesses the first volume mounted, and so on. (For more information on indexing, see
  26428. the section “Indexing” above.)
  26429.  
  26430. IOVLsMod contains the date and time the volume information was last modified
  26431. (this is not necessarily when it was flushed). (This field is not modified when
  26432. information is written to a file.)
  26433.  
  26434. Note:  IOVLsMod replaces the field ioVLsBkUp in ParamBlockRec. The name
  26435.        ioVLsBkUp was actually a misnomer; this field has always contained
  26436.        the date and time of the last modification, not the last backup.
  26437.        Another field, ioVBkUp, contains the date and time of the last backup.
  26438.  
  26439. IOVClpSiz can be used to set the volume clump size in bytes; it’s used for files that
  26440. don’t have a clump size defined as part of their file information in the catalog. To
  26441. promote file contiguity and avoid fragmentation, space is allocated to a file not in
  26442. allocation blocks but in clumps. A clump is a group of contiguous allocation blocks.
  26443. The clump size is always a multiple of the allocation block size; it’s the minimum
  26444. number of bytes to allocate each time the Allocate function is called or the end-of-file
  26445. is reached during the Write routine.
  26446.  
  26447. IOVSigWord contains a signature word identifying the type of volume; it’s $D2D7 for
  26448. flat directory volumes and $4244 for hierarchical directory volumes. The drive number
  26449. of the drive containing the volume is returned in ioDrvInfo. For on-line volumes,
  26450. ioVDRefNum returns the reference number of the I/O driver for the drive identified by
  26451. ioDrvInfo.
  26452.  
  26453. IOVFSID is the file-system identifier. It indicates which file system is servicing
  26454. the volume; it’s 0 for File Manager volumes and nonzero for volumes handled by an
  26455. external file system.
  26456.  
  26457. IOVBkUp specifies the date and time the volume was last backed up (it’s 0 if never
  26458. backed up).
  26459.  
  26460. IOVNmFls contains the number of files in the root directory. IOVFilCnt contains the
  26461. total number of files on the volume, while ioVDirCnt contains the total number of
  26462. directories (not including the root directory).
  26463.  
  26464. Most programmers needn’t be concerned with the other parameters, but interested
  26465. programmers can read the section “Data Organization on Volumes”.
  26466.  
  26467. HParamBlockRec, described above, has been extended to support a shared environment
  26468. with the addition of AccessParam, ObjParam, CopyParam, and
  26469. WDParam, as shown below.  (The complete HParamBlockRec data type is shown in the
  26470. summary.)
  26471.  
  26472.   AccessParam:
  26473.    (filler3:       INTEGER;
  26474.     ioDenyModes:   INTEGER;      {access rights data}
  26475.     filler4:       INTEGER;
  26476.     filler5:       Signed Byte;
  26477.     ioACUser:      Signed Byte;  {access rights for directory only}
  26478.     filler6:       LONGINT;
  26479.     ioACOwnerID:   LONGINT;      {owner ID}
  26480.     ioACGroupID:   LONGINT;      {group ID}
  26481.     ioACAccess:    LONGINT);     {access rights}
  26482.  
  26483.   ObjParam:
  26484.    (filler7:       INTEGER;
  26485.     ioObjType:     INTEGER;   {function code}
  26486.     ioObjNamePtr:  Ptr;       {ptr to returned creator/group name}
  26487.     ioObjID:       LONGINT;   {creator/group ID}
  26488.     ioReqCount:    LONGINT;   {size of buffer area}
  26489.     ioActCount:    LONGINT);  {length of vol parms data}
  26490.  
  26491.   CopyParam:
  26492.    (ioDstVRefNum:  INTEGER;   {destination vol identifier}
  26493.     filler8:       INTEGER;
  26494.     ioNewName:     Ptr;       {ptr to destination pathname}
  26495.     ioCopyName:    Ptr;       {ptr to optional name}
  26496.     ioNewDirID:    LONGINT);  {destination directory ID}
  26497.  
  26498.   WDParam:
  26499.    (filler9:       INTEGER;
  26500.     ioWDIndex:     INTEGER;
  26501.     ioWDProcID:    LONGINT;
  26502.     ioWDVRefNum:   INTEGER;
  26503.     filler10:      INTEGER;
  26504.     filler11:      LONGINT;
  26505.     filler12:      LONGINT;
  26506.     filler13:      LONGINT;
  26507.     ioWDDirID:     LONGINT);
  26508.  
  26509. æKY HFileInfo
  26510. æFc Files.h
  26511. æT struct
  26512. æD struct HFileInfo {
  26513.     ParamBlockHeader 
  26514.     short ioFRefNum;
  26515.     char ioFVersNum;
  26516.     char filler1;
  26517.     short ioFDirIndex;
  26518.     char ioFlAttrib;
  26519.     char filler2;
  26520.     FInfo ioFlFndrInfo;
  26521.     long ioDirID;
  26522.     unsigned short ioFlStBlk;
  26523.     long ioFlLgLen;
  26524.     long ioFlPyLen;
  26525.     unsigned short ioFlRStBlk;
  26526.     long ioFlRLgLen;
  26527.     long ioFlRPyLen;
  26528.     unsigned long ioFlCrDat;
  26529.     unsigned long ioFlMdDat;
  26530.     unsigned long ioFlBkDat;
  26531.     FXInfo ioFlXFndrInfo;
  26532.     long ioFlParID;
  26533.     long ioFlClpSiz;
  26534. };
  26535.  
  26536. typedef struct HFileInfo HFileInfo;
  26537. æC 
  26538.  
  26539. æKY DirInfo
  26540. æFc Files.h
  26541. æT struct
  26542. æD struct DirInfo {
  26543.     ParamBlockHeader 
  26544.     short ioFRefNum;
  26545.     short filler1;
  26546.     short ioFDirIndex;
  26547.     char ioFlAttrib;
  26548.     char filler2;
  26549.     DInfo ioDrUsrWds;
  26550.     long ioDrDirID;
  26551.     unsigned short ioDrNmFls;
  26552.     short filler3[9];
  26553.     unsigned long ioDrCrDat;
  26554.     unsigned long ioDrMdDat;
  26555.     unsigned long ioDrBkDat;
  26556.     DXInfo ioDrFndrInfo;
  26557.     long ioDrParID;
  26558. };
  26559.  
  26560. typedef struct DirInfo DirInfo;
  26561. æC 
  26562.  
  26563. æKY CInfoPBRec
  26564. CInfoPBPtr
  26565. æFc Files.h
  26566. æT struct
  26567. æD union CInfoPBRec {
  26568.     HFileInfo hFileInfo;
  26569.     DirInfo dirInfo;
  26570. };
  26571.  
  26572. typedef union CInfoPBRec CInfoPBRec;
  26573. typedef CInfoPBRec *CInfoPBPtr;
  26574. æC 
  26575. »CInfoPBRec
  26576.  
  26577. The routines GetCatInfo and SetCatInfo are used for getting and setting information
  26578. about the files and directories within a directory. With files,
  26579. you’ll use the following 19 additional fields after the standard eight fields in the
  26580. parameter block record CInfoPBRec:
  26581.  
  26582.     ioFRefNum:      INTEGER;     {path reference number}
  26583.     ioFVersNum:     SignedByte;  {version number}
  26584.     filler1:        SignedByte;  {not used}
  26585.     ioFDirIndex:    INTEGER;     {index}
  26586.     ioFlAttrib:     SignedByte;  {file attributes}
  26587.     filler2:        SignedByte;  {not used}
  26588.   hFileInfo:
  26589.    (ioFlFndrInfo:   FInfo;       {information used by the Finder}
  26590.     ioDirID:        LONGINT;     {directory ID or file number}
  26591.     ioFlStBlk:      INTEGER;     {first allocation block of data fork}
  26592.     ioFlLgLen:      LONGINT;     {logical end-of-file of data fork}
  26593.     ioFlPyLen:      LONGINT;     {physical end-of-file of data fork}
  26594.     ioFlRStBlk:     INTEGER;     {first allocation block of resource fork}
  26595.     ioFlRLgLen:     LONGINT;     {logical end-of-file of resource fork}
  26596.     ioFlRPyLen:     LONGINT;     {physical end-of-file of resource fork}
  26597.     ioFlCrDat:      LONGINT;     {date and time of creation}
  26598.     ioFlMdDat:      LONGINT;     {date and time of last modification}
  26599.     ioFlBkDat:      LONGINT;     {date and time of last backup}
  26600.     ioFlXFndrInfo:  FXInfo;      {additional information used by the Finder}
  26601.     ioFlParID:      LONGINT;     {file's parent directory ID (integer)}
  26602.     ioFlClpSiz:     LONGINT);    {file's clump size}
  26603.  
  26604. •••Refer to Technical Note #69:•••
  26605.  
  26606. IOFDirIndex can be used with the function PBGetCatInfo to index through the files and
  26607. directories in a given directory. For each iteration of the function, you can determine
  26608. whether it’s a file or a directory by testing bit 4 (the fifth least significant bit)
  26609. of ioFlAttrib. You can test for a directory by using the Toolbox Utilities BitTst
  26610. function in the following manner (remember, the Toolbox Utilities routines reverse
  26611. the standard 68000 notation):
  26612.  
  26613.   BitTst(@myCInfoRec.ioFlAttrib,3)
  26614.  
  26615. IOFlAttrib contains the following attributes:
  26616.  
  26617.   Bit    Meaning
  26618.  
  26619.    0     Set if file is locked
  26620.    2     Set if resource fork is open
  26621.    3     Set if data fork is open
  26622.    4     Set if a directory
  26623.    7     Set if file (either fork) is open
  26624.  
  26625. When passed to a routine, ioDirID contains a directory ID; it can be used to refer to
  26626. a directory or, in conjuction with a partial pathname from that directory, to other
  26627. files and directories. If both a directory ID and a working directory reference
  26628. number are provided, the directory ID is used to identify the directory on the volume
  26629. indicated by the working directory reference number. In other words, a directory ID
  26630. specified by the caller will override the working directory referred to by the working
  26631. directory reference number. If you don’t want this to happen, you can set ioDirID to
  26632. 0. (If no directory is specified through a working directory reference number, the
  26633. root directory ID will be used.)
  26634.  
  26635. Warning:  With files, ioDirID returns the file number of the file; when
  26636.           indexing with GetCatInfo, you’ll need to reset this field for
  26637.           each iteration.
  26638.  
  26639. IOFlStBlk and ioFlRStBlk contain 0 if the file’s data or resource fork is empty,
  26640. respectively; they’re used only with flat volumes. The date and time in the ioFlCrDat,
  26641. ioFlMdDat, and ioFlBkDat fields are specified in seconds since midnight, January 1,
  26642. 1904.
  26643.  
  26644. IOFlParID contains the directory ID of the file’s parent. IOFlClpSiz is the clump
  26645. size to be used when writing the file; if it’s 0, the volume’s clump size is used
  26646. when the file is opened.
  26647.  
  26648. With directories, you’ll use the following 14 additional fields after the standard
  26649. eight fields in the parameter block record CInfoPBRec:
  26650.  
  26651.     ioFRefNum:     INTEGER;     {file reference number}
  26652.     ioFVersNum     SignedByte;  {version number}
  26653.     filler1:       SignedByte;  {not used}
  26654.     ioFDirIndex:   INTEGER;     {index}
  26655.     ioFlAttrib:    SignedByte;  {file attributes}
  26656.     filler2:       SignedByte;  {not used}
  26657.   dirInfo:
  26658.    (ioDrUsrWds:    DInfo;       {information used by the Finder}
  26659.     ioDrDirID:     LONGINT;     {directory ID}
  26660.     ioDrNmFls:     INTEGER;     {number of files in directory}
  26661.     filler3:       ARRAY[1..9] OF INTEGER; {not used}
  26662.     ioDrCrDat:     LONGINT;     {date and time of creation}
  26663.     ioDrMdDat:     LONGINT;     {date and time of last modification}
  26664.     ioDrBkDat:     LONGINT;     {date and time of last backup}
  26665.     ioDrFndrInfo:  DXInfo;      {additional information used by the Finder}
  26666.     ioDrParID:     LONGINT);    {directory's parent directory ID (integer)}
  26667.  
  26668. IOFDirIndex can be used with the function PBGetCatInfo to index through the files and
  26669. directories in a given directory. For each iteration of the function, you can determine
  26670. whether it’s a file or a directory by testing bit 4 of ioFlAttrib.
  26671.  
  26672. When passed to a routine, ioDrDirID contains a directory ID; it can be used to refer
  26673. to a directory or, in conjuction with a partial pathname from that directory, to
  26674. other files and directories. If both a directory ID and a working directory reference
  26675. number are provided, the directory ID is used to identify the directory on the volume
  26676. indicated by the working directory reference number. In other words, a directory ID
  26677. specified by the caller will override the working directory referred to by the working
  26678. directory reference number. If you don’t want this to happen, you can set ioDirID to
  26679. 0. (If no directory is specified through a working directory reference number, the
  26680. root directory ID will be used.)
  26681.  
  26682. With directories, ioDrDirID returns the directory ID of the directory.
  26683.  
  26684. IODrNmFls is the number of files and directories contained in this directory
  26685. (the valence of the directory).
  26686.  
  26687. The date and time in the ioDrCrDat, ioDrMdDat, and ioDrBkDat fields are specified in
  26688. seconds since midnight, January 1, 1904.
  26689.  
  26690. IODrParID contains the directory ID of the directory’s parent.
  26691.  
  26692. æKY HIOParam
  26693. æFc Files.h
  26694. æT struct
  26695. æD struct HIOParam {
  26696.     ParamBlockHeader 
  26697.     short ioRefNum;
  26698.     char ioVersNum;
  26699.     char ioPermssn;
  26700.     Ptr ioMisc;
  26701.     Ptr ioBuffer;
  26702.     long ioReqCount;
  26703.     long ioActCount;
  26704.     short ioPosMode;
  26705.     long ioPosOffset;
  26706.     short filler1;
  26707. };
  26708.  
  26709. typedef struct HIOParam HIOParam;
  26710. æC 
  26711.  
  26712. æKY HFileParam
  26713. æFc Files.h
  26714. æT struct
  26715. æD struct HFileParam {
  26716.     ParamBlockHeader 
  26717.     short ioFRefNum;
  26718.     char ioFVersNum;
  26719.     char filler1;
  26720.     short ioFDirIndex;
  26721.     char ioFlAttrib;
  26722.     char ioFlVersNum;
  26723.     FInfo ioFlFndrInfo;
  26724.     long ioDirID;
  26725.     unsigned short ioFlStBlk;
  26726.     long ioFlLgLen;
  26727.     long ioFlPyLen;
  26728.     unsigned short ioFlRStBlk;
  26729.     long ioFlRLgLen;
  26730.     long ioFlRPyLen;
  26731.     unsigned long ioFlCrDat;
  26732.     unsigned long ioFlMdDat;
  26733. };
  26734.  
  26735. typedef struct HFileParam HFileParam;
  26736. æC 
  26737.  
  26738. æKY HVolumeParam
  26739. æFc Files.h
  26740. æT struct
  26741. æD struct HVolumeParam {
  26742.     ParamBlockHeader 
  26743.     long filler2;
  26744.     short ioVolIndex;
  26745.     unsigned long ioVCrDate;
  26746.     unsigned long ioVLsMod;
  26747.     short ioVAtrb;
  26748.     unsigned short ioVNmFls;
  26749.     short ioVBitMap;
  26750.     short ioAllocPtr;
  26751.     unsigned short ioVNmAlBlks;
  26752.     long ioVAlBlkSiz;
  26753.     long ioVClpSiz;
  26754.     short ioAlBlSt;
  26755.     long ioVNxtCNID;
  26756.     unsigned short ioVFrBlk;
  26757.     unsigned short ioVSigWord;
  26758.     short ioVDrvInfo;
  26759.     short ioVDRefNum;
  26760.     short ioVFSID;
  26761.     unsigned long ioVBkUp;
  26762.     unsigned short ioVSeqNum;
  26763.     long ioVWrCnt;
  26764.     long ioVFilCnt;
  26765.     long ioVDirCnt;
  26766.     long ioVFndrInfo[8];
  26767. };
  26768.  
  26769. typedef struct HVolumeParam HVolumeParam;
  26770. æC 
  26771.  
  26772. æKY AccessParam
  26773. æFc Files.h
  26774. æT struct
  26775. æD struct AccessParam {
  26776.     ParamBlockHeader 
  26777.     short filler3;
  26778.     short ioDenyModes; /*access rights data*/
  26779.     short filler4;
  26780.     char filler5;
  26781.     char ioACUser; /*access rights for directory only*/
  26782.     long filler6;
  26783.     long ioACOwnerID; /*owner ID*/
  26784.     long ioACGroupID; /*group ID*/
  26785.     long ioACAccess; /*access rights*/
  26786. };
  26787.  
  26788. typedef struct AccessParam AccessParam;
  26789. æC 
  26790.  
  26791. æKY ObjParam
  26792. æFc Files.h
  26793. æT struct
  26794. æD struct ObjParam {
  26795.     ParamBlockHeader 
  26796.     short filler7;
  26797.     short ioObjType; /*function code*/
  26798.     StringPtr ioObjNamePtr; /*ptr to returned creator/group name*/
  26799.     long ioObjID; /*creator/group ID*/
  26800.     long ioReqCount; /*size of buffer area*/
  26801.     long ioActCount; /*length of vol parms data*/
  26802. };
  26803.  
  26804. typedef struct ObjParam ObjParam;
  26805. æC 
  26806.  
  26807. æKY CopyParam
  26808. æFc Files.h
  26809. æT struct
  26810. æD struct CopyParam {
  26811.     ParamBlockHeader 
  26812.     short ioDstVRefNum; /*destination vol identifier*/
  26813.     short filler8;
  26814.     StringPtr ioNewName; /*ptr to destination pathname*/
  26815.     StringPtr ioCopyName; /*ptr to optional name*/
  26816.     long ioNewDirID; /*destination directory ID*/
  26817.     long filler14;
  26818.     long filler15;
  26819.     long ioDirID; /*same as in FileParam*/
  26820. };
  26821.  
  26822. typedef struct CopyParam CopyParam;
  26823. æC 
  26824.  
  26825. æKY WDParam
  26826. æFc Files.h
  26827. æT struct
  26828. æD struct WDParam {
  26829.     ParamBlockHeader 
  26830.     short filler9;
  26831.     short ioWDIndex;
  26832.     long ioWDProcID;
  26833.     short ioWDVRefNum;
  26834.     short filler10;
  26835.     long filler11;
  26836.     long filler12;
  26837.     long filler13;
  26838.     long ioWDDirID;
  26839. };
  26840.  
  26841. typedef struct WDParam WDParam;
  26842. æC 
  26843.  
  26844. æKY FIDParam
  26845. æFc Files.h
  26846. æT struct
  26847. æD struct FIDParam {
  26848.     ParamBlockHeader 
  26849.     long filler1;
  26850.     StringPtr ioDestNamePtr; /* dest file name */
  26851.     long filler2;
  26852.     long ioDestDirID; /* dest file's directory id */
  26853.     long filler3;
  26854.     long filler4;
  26855.     long ioSrcDirID; /* source file's directory id */
  26856.     short filler5;
  26857.     long ioFileID; /* file ID */
  26858. };
  26859.  
  26860. typedef struct FIDParam FIDParam;
  26861. æC 
  26862.  
  26863. æKY CatPositionRec
  26864. æFc Files.h
  26865. æT struct
  26866. æD struct CatPositionRec {
  26867.     long initialize;
  26868.     short priv[6];
  26869. };
  26870.  
  26871. typedef struct CatPositionRec CatPositionRec;
  26872. æC 
  26873.  
  26874. æKY FSSpec
  26875. FSSpecPtr
  26876. FSSpecHandle
  26877. æFc Files.h
  26878. æT struct
  26879. æD struct FSSpec {
  26880.     short vRefNum;
  26881.     long parID;
  26882.     Str63 name;
  26883. };
  26884.  
  26885. typedef struct FSSpec FSSpec;
  26886. typedef FSSpec *FSSpecPtr, **FSSpecHandle;
  26887. æC 
  26888.  
  26889. æKY FSSpecArray
  26890. FSSpecArrayPtr
  26891. FSSpecArrayHandle
  26892. æFc Files.h
  26893. æT struct
  26894. æD typedef FSSpecPtr FSSpecArrayPtr;    /* pointer to array of FSSpecs */
  26895. æC 
  26896.  
  26897. æKY VolumeType
  26898. æFc Files.h
  26899. æT typedef
  26900. æD typedef OSType VolumeType;
  26901. æC 
  26902.  
  26903. æKY AppleShareMediaType
  26904. æFc Files.h
  26905. æT #define
  26906. æD #define AppleShareMediaType 'afpm' /* the signature for AppleShare */
  26907. æC 
  26908.  
  26909. æKY VolMountInfoHeader
  26910. VolMountInfoPtr
  26911. æFc Files.h
  26912. æT struct
  26913. æD struct VolMountInfoHeader {
  26914.     short length; /* length of location data (including self) */
  26915.     VolumeType media; /* type of media .  Variable length data follows */
  26916. };
  26917.  
  26918. typedef struct VolMountInfoHeader VolMountInfoHeader;
  26919. typedef VolMountInfoHeader *VolMountInfoPtr;
  26920. æC 
  26921.  
  26922. æKY AFPVolMountInfo
  26923. AFPVolMountInfoPtr
  26924. æFc Files.h
  26925. æT struct
  26926. æD struct AFPVolMountInfo {
  26927.     short length; /* length of location data (including self) */
  26928.     VolumeType media; /* type of media */
  26929.     short flags; /* bits for no messages, no reconnect */
  26930.     char nbpInterval; /* NBP Interval parameter (IM2, p.322) */
  26931.     char nbpCount; /* NBP Interval parameter (IM2, p.322) */
  26932.     short uamType; /* User Authentication Method */
  26933.     short zoneNameOffset; /* short positive offset from start of struct to Zone Name */
  26934.     short serverNameOffset; /* offset to pascal Server Name string */
  26935.     short volNameOffset; /* offset to pascal Volume Name string */
  26936.     short userNameOffset; /* offset to pascal User Name string */
  26937.     short userPasswordOffset; /* offset to pascal User Password string */
  26938.     short volPasswordOffset; /* offset to pascal Volume Password string */
  26939.     char AFPData[144]; /*variable length data may follow*/
  26940. };
  26941.  
  26942. typedef struct AFPVolMountInfo AFPVolMountInfo;
  26943. typedef AFPVolMountInfo *AFPVolMountInfoPtr;
  26944. æC 
  26945.  
  26946. æKY CSParam
  26947. CSParamPtr
  26948. æFc Files.h
  26949. æT struct
  26950. æD struct CSParam {
  26951.     ParamBlockHeader 
  26952.     FSSpecPtr ioMatchPtr; /* match array */
  26953.     long ioReqMatchCount; /* maximum allowable matches */
  26954.     long ioActMatchCount; /* actual match count */
  26955.     long ioSearchBits; /* search criteria selector */
  26956.     CInfoPBPtr ioSearchInfo1; /* search values and range lower bounds */
  26957.     CInfoPBPtr ioSearchInfo2; /* search values and range upper bounds */
  26958.     long ioSearchTime; /* length of time to run search */
  26959.     CatPositionRec ioCatPosition; /* current position in the catalog */
  26960.     Ptr ioOptBuffer; /* optional performance enhancement buffer */
  26961.     long ioOptBufSize; /* size of buffer pointed to by ioOptBuffer */
  26962. };
  26963.  
  26964. typedef struct CSParam CSParam;
  26965. typedef CSParam *CSParamPtr;
  26966. æC 
  26967.  
  26968. æKY DTPBRec
  26969. DTPBPtr
  26970. æFc Files.h
  26971. æT struct
  26972. æD struct DTPBRec {
  26973.     ParamBlockHeader 
  26974.     short ioDTRefNum; /* desktop refnum */
  26975.     short ioIndex;
  26976.     long ioTagInfo;
  26977.     Ptr ioDTBuffer;
  26978.     long ioDTReqCount;
  26979.     long ioDTActCount;
  26980.     char ioFiller1;
  26981.     char ioIconType;
  26982.     short ioFiller2;
  26983.     long ioDirID;
  26984.     OSType ioFileCreator;
  26985.     OSType ioFileType;
  26986.     long ioFiller3;
  26987.     long ioDTLgLen;
  26988.     long ioDTPyLen;
  26989.     short ioFiller4[14];
  26990.     long ioAPPLParID;
  26991. };
  26992.  
  26993. typedef struct DTPBRec DTPBRec;
  26994. typedef DTPBRec *DTPBPtr;
  26995. æC 
  26996.  
  26997. æKY ForeignPrivParam
  26998. ForeignPrivParamPtr
  26999. æFc Files.h
  27000. æT struct
  27001. æD struct ForeignPrivParam {
  27002.     ParamBlockHeader 
  27003.     long ioFiller1;
  27004.     long ioFiller2;
  27005.     Ptr ioForeignPrivBuffer;
  27006.     long ioForeignPrivActCount;
  27007.     long ioForeignPrivReqCount;
  27008.     long ioFiller3;
  27009.     long ioForeignPrivDirID;
  27010.     long ioForeignPrivInfo1;
  27011.     long ioForeignPrivInfo2;
  27012.     long ioForeignPrivInfo3;
  27013.     long ioForeignPrivInfo4;
  27014. };
  27015.  
  27016. typedef struct ForeignPrivParam ForeignPrivParam;
  27017. typedef ForeignPrivParam *ForeignPrivParamPtr;
  27018. æC 
  27019.  
  27020. æKY HParamBlockRec
  27021. HParmBlkPtr
  27022. æFc Files.h
  27023. æT struct
  27024. æD union HParamBlockRec {
  27025.     HIOParam ioParam;
  27026.     HFileParam fileParam;
  27027.     HVolumeParam volumeParam;
  27028.     AccessParam accessParam;
  27029.     ObjParam objParam;
  27030.     CopyParam copyParam;
  27031.     WDParam wdParam;
  27032.     FIDParam fidParam;
  27033.     CSParam csParam;
  27034.     ForeignPrivParam foreignPrivParam;
  27035. };
  27036.  
  27037. typedef union HParamBlockRec HParamBlockRec;
  27038. typedef HParamBlockRec *HParmBlkPtr;
  27039. æC »FileParam Variant ( ParamBlockRec and HParamBlockRec)
  27040.  
  27041. The fileParam variants of ParamBlockRec and HParamBlockRec are identical, with one
  27042. exception:  The field ioDirID in HParamBlockRec is called ioFlNum in ParamBlockRec.
  27043. The fields of the fileParam variant of HParamBlockRec are as follows:  
  27044.  
  27045. •••Refer to Technical Note #204:•••
  27046.  
  27047.   fileParam:
  27048.    (ioFRefNum:     INTEGER;     {path reference number}
  27049.     ioFVersNum:    SignedByte;  {version number}
  27050.     filler1:       SignedByte;  {not used}
  27051.     ioFDirIndex:   INTEGER;     {index}
  27052.     ioFlAttrib:    SignedByte;  {file attributes}
  27053.     ioFlVersNum:   SignedByte;  {version number}
  27054.     ioFlFndrInfo:  FInfo;       {information used by the Finder}
  27055.     ioDirID:       LONGINT;     {directory ID or file number}
  27056.     ioFlStBlk:     INTEGER;     {first allocation block of data fork}
  27057.     ioFlLgLen:     LONGINT;     {logical end-of-file of data fork}
  27058.     ioFlPyLen:     LONGINT;     {physical end-of-file of data fork}
  27059.     ioFlRStBlk:    INTEGER;     {first allocation block of resource fork}
  27060.     ioFlRLgLen:    LONGINT;     {logical end-of-file of resource fork}
  27061.     ioFlRPyLen:    LONGINT;     {physical end-of-file of resource fork}
  27062.     ioFlCrDat:     LONGINT;     {date and time of creation}
  27063.     ioFlMdDat:     LONGINT);    {date and time of last modification}
  27064.  
  27065. IOFDirIndex can be used with the PBGetFInfo and PBHGetFInfo to index through the
  27066. files in a given directory.
  27067.  
  27068. Warning:  When used with GetFileInfo, ioFDirIndex will index only the files
  27069.           in a directory. To index both files and directories, you can use
  27070.           ioFDirIndex with PBGetCatInfo.
  27071.  
  27072. IOFlAttrib contains the following file attributes:
  27073.  
  27074.   Bit    Meaning
  27075.  
  27076.    0     Set if file is locked
  27077.    2     Set if resource fork is open
  27078.    3     Set if data fork is open
  27079.    4     Set if a directory
  27080.    7     Set if file (either fork) is open
  27081.  
  27082. When passed to a routine, ioDirID contains a directory ID; it can be used to refer to
  27083. a directory or, in conjuction with a partial pathname from that directory, to other
  27084. files and directories. If both a directory ID and a working directory reference
  27085. number are provided, the directory ID is used to identify the directory on the volume
  27086. indicated by the working directory reference number. In other words, a directory ID
  27087. specified by the caller will override the working directory referred to by the working
  27088. directory reference number. If you don’t want this to happen, you can set ioDirID to
  27089. 0. (If no directory is specified through a working directory reference number, the
  27090. root directory ID will be used.)
  27091.  
  27092. When returned from a routine, ioDirID contains the file number of a file; most programmers
  27093. needn’t be concerned with file numbers, but those interested can read the section
  27094. “Data Organization on Volumes”.
  27095.  
  27096. IOFlStBlk and ioFlRStBlk contain 0 if the file’s data or resource fork is empty,
  27097. respectively; they’re used only with flat volumes. The date and time in the ioFlCrDat
  27098. and ioFlMdDat fields are specified in seconds since midnight,
  27099. January 1, 1904.
  27100.  
  27101. »VolumeParam Variant (ParamBlockRec)
  27102.  
  27103. When you call GetVolInfo, you’ll use the volumeParam variant of ParamBlockRec:
  27104.  
  27105.   volumeParam:
  27106.    (filler2:      LONGINT;    {not used}
  27107.     ioVolIndex:   INTEGER;    {index}
  27108.     ioVCrDate:    LONGINT;    {date and time of initialization}
  27109.     ioVLsBkUp:    LONGINT;    {date and time of last modification}
  27110.     ioVAtrb:      INTEGER;    {volume attributes}
  27111.     ioVNmFls:     INTEGER;    {number of files in root directory}
  27112.     ioVDirSt:     INTEGER;    {first block of directory}
  27113.     ioVBlLn:      INTEGER;    {length of directory in blocks}
  27114.     ioVNmAlBlks:  INTEGER;    {number of allocation blocks}
  27115.     ioVAlBlkSiz:  LONGINT;    {size of allocation blocks}
  27116.     ioVClpSiz:    LONGINT;    {number of bytes to allocate}
  27117.     ioAlBlSt:     INTEGER;    {first block in volume block map}
  27118.     ioVNxtFNum:   LONGINT;    {next unused file number}
  27119.     ioVFrBlk:     INTEGER);   {number of unused allocation blocks}
  27120.  
  27121. IOVolIndex can be used to index through all the mounted volumes; using an index of 1
  27122. accesses the first volume mounted, and so on. (For more information on indexing, see
  27123. the section “Indexing” above.)
  27124.  
  27125. IOVLsBkUp contains the date and time the volume information was last modified
  27126. (this is not necessarily when it was flushed). (This field is not modified when
  27127. information is written to a file.)
  27128.  
  27129. Note:  The name ioVLsBkUp is actually a misnomer; this field has always
  27130.        contained the date and time of the last modification to the volume,
  27131.        not the last backup.
  27132.  
  27133. Most programmers needn’t be concerned with the remaining parameters, but interested
  27134. programmers can read the section “Data Organization on Volumes”.
  27135.  
  27136. »VolumeParam Variant (HParamBlockRec)
  27137.  
  27138. When you call HGetVInfo and SetVolInfo, you’ll use the volumeParam variant of HParamBlockRec.
  27139. This is a superset of the volumeParam variant of ParamBlockRec; the names and functions
  27140. of certain fields have been changed, and new fields have been added:
  27141.  
  27142.   volumeParam:
  27143.    (filler2:      LONGINT;    {not used}
  27144.     ioVolIndex:   INTEGER;    {index}
  27145.     ioVCrDate:    LONGINT;    {date and time of initialization}
  27146.     ioVLsMod:     LONGINT;    {date and time of last modification}
  27147.     ioVAtrb:      INTEGER;    {volume attributes}
  27148.     ioVNmFls:     INTEGER;    {number of files in root directory}
  27149.     ioVBitMap:    INTEGER;    {first block of volume bit map}
  27150.     ioAllocPtr:   INTEGER;    {block at which next new file starts}
  27151.     ioVNmAlBlks:  INTEGER;    {number of allocation blocks}
  27152.     ioVAlBlkSiz:  LONGINT;    {size of allocation blocks}
  27153.     ioVClpSiz:    LONGINT;    {number of bytes to allocate}
  27154.     ioAlBlSt:     INTEGER;    {first block in volume block map}
  27155.     ioVNxtCNID:   LONGINT;    {next unused file number}
  27156.     ioVFrBlk:     INTEGER;    {number of unused allocation blocks}
  27157.     ioVSigWord:   INTEGER;    {volume signature}
  27158.     ioVDrvInfo:   INTEGER;    {drive number}
  27159.     ioVDRefNum:   INTEGER;    {driver reference number}
  27160.     ioVFSID:      INTEGER;    {file system handling this volume}
  27161.     ioVBkUp:      LONGINT;    {date and time of last backup}
  27162.     ioVSeqNum:    INTEGER;    {used internally}
  27163.     ioVWrCnt      LONGINT;    {volume write count}
  27164.     ioVFilCnt:    LONGINT;    {number of files on volume}
  27165.     ioVDirCnt:    LONGINT;    {number of directories on volume}
  27166.     ioVFndrInfo:  ARRAY[1..8] OF LONGINT); {information used by the Finder}
  27167.  
  27168. IOVolIndex can be used to index through all the mounted volumes; using an index of 1
  27169. accesses the first volume mounted, and so on. (For more information on indexing, see
  27170. the section “Indexing” above.)
  27171.  
  27172. IOVLsMod contains the date and time the volume information was last modified
  27173. (this is not necessarily when it was flushed). (This field is not modified when
  27174. information is written to a file.)
  27175.  
  27176. Note:  IOVLsMod replaces the field ioVLsBkUp in ParamBlockRec. The name
  27177.        ioVLsBkUp was actually a misnomer; this field has always contained
  27178.        the date and time of the last modification, not the last backup.
  27179.        Another field, ioVBkUp, contains the date and time of the last backup.
  27180.  
  27181. IOVClpSiz can be used to set the volume clump size in bytes; it’s used for files that
  27182. don’t have a clump size defined as part of their file information in the catalog. To
  27183. promote file contiguity and avoid fragmentation, space is allocated to a file not in
  27184. allocation blocks but in clumps. A clump is a group of contiguous allocation blocks.
  27185. The clump size is always a multiple of the allocation block size; it’s the minimum
  27186. number of bytes to allocate each time the Allocate function is called or the end-of-file
  27187. is reached during the Write routine.
  27188.  
  27189. IOVSigWord contains a signature word identifying the type of volume; it’s $D2D7 for
  27190. flat directory volumes and $4244 for hierarchical directory volumes. The drive number
  27191. of the drive containing the volume is returned in ioDrvInfo. For on-line volumes,
  27192. ioVDRefNum returns the reference number of the I/O driver for the drive identified by
  27193. ioDrvInfo.
  27194.  
  27195. IOVFSID is the file-system identifier. It indicates which file system is servicing
  27196. the volume; it’s 0 for File Manager volumes and nonzero for volumes handled by an
  27197. external file system.
  27198.  
  27199. IOVBkUp specifies the date and time the volume was last backed up (it’s 0 if never
  27200. backed up).
  27201.  
  27202. IOVNmFls contains the number of files in the root directory. IOVFilCnt contains the
  27203. total number of files on the volume, while ioVDirCnt contains the total number of
  27204. directories (not including the root directory).
  27205.  
  27206. Most programmers needn’t be concerned with the other parameters, but interested
  27207. programmers can read the section “Data Organization on Volumes”.
  27208.  
  27209. HParamBlockRec, described above, has been extended to support a shared environment
  27210. with the addition of AccessParam, ObjParam, CopyParam, and
  27211. WDParam, as shown below.  (The complete HParamBlockRec data type is shown in the
  27212. summary.)
  27213.  
  27214.   AccessParam:
  27215.    (filler3:       INTEGER;
  27216.     ioDenyModes:   INTEGER;      {access rights data}
  27217.     filler4:       INTEGER;
  27218.     filler5:       Signed Byte;
  27219.     ioACUser:      Signed Byte;  {access rights for directory only}
  27220.     filler6:       LONGINT;
  27221.     ioACOwnerID:   LONGINT;      {owner ID}
  27222.     ioACGroupID:   LONGINT;      {group ID}
  27223.     ioACAccess:    LONGINT);     {access rights}
  27224.  
  27225.   ObjParam:
  27226.    (filler7:       INTEGER;
  27227.     ioObjType:     INTEGER;   {function code}
  27228.     ioObjNamePtr:  Ptr;       {ptr to returned creator/group name}
  27229.     ioObjID:       LONGINT;   {creator/group ID}
  27230.     ioReqCount:    LONGINT;   {size of buffer area}
  27231.     ioActCount:    LONGINT);  {length of vol parms data}
  27232.  
  27233.   CopyParam:
  27234.    (ioDstVRefNum:  INTEGER;   {destination vol identifier}
  27235.     filler8:       INTEGER;
  27236.     ioNewName:     Ptr;       {ptr to destination pathname}
  27237.     ioCopyName:    Ptr;       {ptr to optional name}
  27238.     ioNewDirID:    LONGINT);  {destination directory ID}
  27239.  
  27240.   WDParam:
  27241.    (filler9:       INTEGER;
  27242.     ioWDIndex:     INTEGER;
  27243.     ioWDProcID:    LONGINT;
  27244.     ioWDVRefNum:   INTEGER;
  27245.     filler10:      INTEGER;
  27246.     filler11:      LONGINT;
  27247.     filler12:      LONGINT;
  27248.     filler13:      LONGINT;
  27249.     ioWDDirID:     LONGINT);
  27250.  
  27251. æKY CMovePBRec
  27252. CMovePBPtr
  27253. æFc Files.h
  27254. æT struct
  27255. æD struct CMovePBRec {
  27256.     QElemPtr qLink;
  27257.     short qType;
  27258.     short ioTrap;
  27259.     Ptr ioCmdAddr;
  27260.     ProcPtr ioCompletion;
  27261.     OSErr ioResult;
  27262.     StringPtr ioNamePtr;
  27263.     short ioVRefNum;
  27264.     long filler1;
  27265.     StringPtr ioNewName;
  27266.     long filler2;
  27267.     long ioNewDirID;
  27268.     long filler3[2];
  27269.     long ioDirID;
  27270. };
  27271.  
  27272. typedef struct CMovePBRec CMovePBRec;
  27273. typedef CMovePBRec *CMovePBPtr;
  27274. æC 
  27275.  
  27276. »CMovePBRec
  27277.  
  27278. When you call CatMove to move files or directories into a different directory, you’ll
  27279. use the following six additional fields after the standard eight fields in the parameter
  27280. block record CMovePBRec:
  27281.  
  27282.   filler1:     LONGINT;    {not used}
  27283.   ioNewName:   StringPtr;  {name of new directory}
  27284.   filler2:     LONGINT;    {not used}
  27285.   ioNewDirID:  LONGINT;    {directory ID of new directory}
  27286.   filler3:     ARRAY[1..2] OF LONGINT; {not used}
  27287.   ioDirID:     LONGINT);   {directory ID of current directory}
  27288.  
  27289. IONewName and ioNewDirID specify the name and directory ID of the directory to which
  27290. the file or directory is to be moved. IODirID (used in conjuntion with the ioVRefNum
  27291. and ioNamePtr) specifies the current directory ID of the file or directory to be
  27292. moved.
  27293.  
  27294. æKY WDPBRec
  27295. WDPBPtr
  27296. æFc Files.h
  27297. æT struct
  27298. æD struct WDPBRec {
  27299.     QElemPtr qLink;
  27300.     short qType;
  27301.     short ioTrap;
  27302.     Ptr ioCmdAddr;
  27303.     ProcPtr ioCompletion;
  27304.     OSErr ioResult;
  27305.     StringPtr ioNamePtr;
  27306.     short ioVRefNum;
  27307.     short filler1;
  27308.     short ioWDIndex;
  27309.     long ioWDProcID;
  27310.     short ioWDVRefNum;
  27311.     short filler2[7];
  27312.     long ioWDDirID;
  27313. };
  27314.  
  27315. typedef struct WDPBRec WDPBRec;
  27316. typedef WDPBRec *WDPBPtr;
  27317. æC 
  27318.  
  27319. »WDPBRec
  27320.  
  27321. When you call the routines that open, close, and get information about working directories,
  27322. you’ll use the following six additional fields after the standard eight fields in the
  27323. parameter block record WDPBRec:
  27324.  
  27325.   filler1:      INTEGER;    {not used}
  27326.   ioWDIndex:    INTEGER;    {index}
  27327.   ioWDProcID:   LONGINT;    {working directory user identifier}
  27328.   ioWDVRefNum:  INTEGER;    {working directory's volume reference number}
  27329.   filler2:      ARRAY[1..7] OF INTEGER;  {not used}
  27330.   ioWDDirID:    LONGINT);   {working directory's directory ID}
  27331.  
  27332. IOWDIndex can be used with the function PBGetWDInfo to index through the current
  27333. working directories.
  27334.  
  27335. IOWDProcID is an identifier that’s used to distinguish between working directories
  27336. set up by different users; you should use the application’s signature (discussed in
  27337. the Finder Interface chapter) as the ioWDProcID.
  27338.  
  27339. æKY FCBPBRec
  27340. FCBPBPtr
  27341. æFc Files.h
  27342. æT struct
  27343. æD struct FCBPBRec {
  27344.     QElemPtr qLink;
  27345.     short qType;
  27346.     short ioTrap;
  27347.     Ptr ioCmdAddr;
  27348.     ProcPtr ioCompletion;
  27349.     OSErr ioResult;
  27350.     StringPtr ioNamePtr;
  27351.     short ioVRefNum;
  27352.     short ioRefNum;
  27353.     short filler;
  27354.     short ioFCBIndx;
  27355.     short filler1;
  27356.     long ioFCBFlNm;
  27357.     short ioFCBFlags;
  27358.     unsigned short ioFCBStBlk;
  27359.     long ioFCBEOF;
  27360.     long ioFCBPLen;
  27361.     long ioFCBCrPs;
  27362.     short ioFCBVRefNum;
  27363.     long ioFCBClpSiz;
  27364.     long ioFCBParID;
  27365. };
  27366.  
  27367. typedef struct FCBPBRec FCBPBRec;
  27368. typedef FCBPBRec *FCBPBPtr;
  27369. æC 
  27370.  
  27371. æKY VCB
  27372. æFc Files.h
  27373. æT struct
  27374. æD struct VCB {
  27375.     QElemPtr qLink;
  27376.     short qType;
  27377.     short vcbFlags;
  27378.     unsigned short vcbSigWord;
  27379.     unsigned long vcbCrDate;
  27380.     unsigned long vcbLsMod;
  27381.     short vcbAtrb;
  27382.     unsigned short vcbNmFls;
  27383.     short vcbVBMSt;
  27384.     short vcbAllocPtr;
  27385.     unsigned short vcbNmAlBlks;
  27386.     long vcbAlBlkSiz;
  27387.     long vcbClpSiz;
  27388.     short vcbAlBlSt;
  27389.     long vcbNxtCNID;
  27390.     unsigned short vcbFreeBks;
  27391.     Str27 vcbVN;
  27392.     short vcbDrvNum;
  27393.     short vcbDRefNum;
  27394.     short vcbFSID;
  27395.     short vcbVRefNum;
  27396.     Ptr vcbMAdr;
  27397.     Ptr vcbBufAdr;
  27398.     short vcbMLen;
  27399.     short vcbDirIndex;
  27400.     short vcbDirBlk;
  27401.     unsigned long vcbVolBkUp;
  27402.     unsigned short vcbVSeqNum;
  27403.     long vcbWrCnt;
  27404.     long vcbXTClpSiz;
  27405.     long vcbCTClpSiz;
  27406.     unsigned short vcbNmRtDirs;
  27407.     long vcbFilCnt;
  27408.     long vcbDirCnt;
  27409.     long vcbFndrInfo[8];
  27410.     unsigned short vcbVCSize;
  27411.     unsigned short vcbVBMCSiz;
  27412.     unsigned short vcbCtlCSiz;
  27413.     unsigned short vcbXTAlBlks;
  27414.     unsigned short vcbCTAlBlks;
  27415.     short vcbXTRef;
  27416.     short vcbCTRef;
  27417.     Ptr vcbCtlBuf;
  27418.     long vcbDirIDM;
  27419.     short vcbOffsM;
  27420. };
  27421.  
  27422. typedef struct VCB VCB;
  27423. æC 
  27424. »Volume Control Blocks
  27425.  
  27426. •••Refer to Technical Note #106:•••
  27427.  
  27428. Each time a volume is mounted, its volume information is read from it and is used to
  27429. build a new volume control block in the volume-control-block queue
  27430. (unless an ejected or off-line volume is being remounted). A copy of the volume block
  27431. map is also read from the volume and placed in the system heap, and a volume buffer
  27432. is created in the system heap.
  27433.  
  27434. The volume-control-block queue is a standard Operating System queue that’s maintained
  27435. in the system heap. It contains a volume control block for each mounted volume. A
  27436. volume control block is a 178-byte nonrelocatable block that contains volume-specific
  27437. information. It has the following structure:
  27438.  
  27439. TYPE VCB = RECORD
  27440.              qLink:        QElemPtr;   {next queue entry}
  27441.              qType:        INTEGER;    {queue type}
  27442.              vcbFlags:     INTEGER;    {bit 15=1 if dirty}
  27443.              vcbSigWord:   INTEGER;    {$4244 for hierarchical, $D2D7 for flat}
  27444.              vcbCrDate:    LONGINT;    {date and time of initialization}
  27445.              vcbLsMod:     LONGINT;    {date and time of last modification}
  27446.              vcbAtrb:      INTEGER;    {volume attributes}
  27447.              vcbNmFls:     INTEGER;    {number of files in directory}
  27448.              vcbVBMSt:     INTEGER;    {first block of volume bit map}
  27449.              vcbAllocPtr:  INTEGER;    {used internally}
  27450.              vcbNmAlBlks:  INTEGER;    {number of allocation blocks}
  27451.              vcbAlBlkSiz:  LONGINT;    {allocation block size}
  27452.              vcbClpSiz:    LONGINT;    {default clump size}
  27453.              vcbAlBlSt:    INTEGER;    {first block in block map}
  27454.              vcbNxtCNID:   LONGINT;    {next unused directory ID or file number}
  27455.              vcbFreeBks:   INTEGER;    {number of unused allocation blocks}
  27456.              vcbVN:        STRING[27]; {volume name}
  27457.              vcbDrvNum:    INTEGER;    {drive number}
  27458.              vcbDRefNum:   INTEGER;    {driver reference number}
  27459.              vcbFSID:      INTEGER;    {file-system identifier}
  27460.              vcbVRefNum:   INTEGER;    {volume reference number}
  27461.              vcbMAdr:      Ptr;        {pointer to block map}
  27462.              vcbBufAdr:    Ptr;        {pointer to volume buffer}
  27463.              vcbMLen:      INTEGER;    {number of bytes in block map}
  27464.              vcbDirIndex:  INTEGER;    {used internally}
  27465.              vcbDirBlk:    INTEGER;    {used internally}
  27466.              vcbVolBkUp:   LONGINT;    {date and time of last backup}
  27467.              vcbVSeqNum:   INTEGER;    {used internally}
  27468.              vcbWrCnt:     LONGINT;    {volume write count}
  27469.              vcbXTClpSiz:  LONGINT;    {clump size of extents tree file}
  27470.              vcbCTClpSiz:  LONGINT;    {clump size of catalog tree file}
  27471.              vcbNmRtDirs:  INTEGER;    {number of directories in root}
  27472.              vcbFilCnt:    LONGINT;    {number of files on volume}
  27473.              vcbDirCnt:    LONGINT;    {number of directories on volume}
  27474.              vcbFndrInfo:  ARRAY[1..8] OF LONGINT;  {information used by }
  27475.                                                     { the Finder}
  27476.              vcbVCSize:    INTEGER;    {used internally}
  27477.              vcbVBMCSiz:   INTEGER;    {used internally}
  27478.              vcbCtlCSiz:   INTEGER;    {used internally}
  27479.              vcbXTAlBks:   INTEGER;    {size in blocks of extents tree file}
  27480.              vcbCTAlBks:   INTEGER;    {size in blocks of catalog tree file}
  27481.              vcbXTRef:     INTEGER;    {path reference number for extents }
  27482.                                        { tree file}
  27483.              vcbCTRef:     INTEGER;    {path reference number for catalog }
  27484.                                        { tree file}
  27485.              vcbCtlBuf:    Ptr;        {pointer to extents and catalog }
  27486.                                        { tree caches}
  27487.              vcbDirIDM:    LONGINT;    {directory last searched}
  27488.              vcbOffsM:     INTEGER     {offspring index at last search}
  27489.            END;
  27490.  
  27491. 64K ROM note:  A volume control block created for a flat volume is a subset
  27492.                of the above structure. It’s actually smaller and contains
  27493.                only the fields up to and including vcbDirBlk. In addition,
  27494.                the names of several fields have been changed to reflect the
  27495.                fact that they contain different information on hierarchical
  27496.                volumes:  vcbLsBkUp, vcbDirSt, vcbBlLn, vcbNmBlks, and
  27497.                vcbNxtFNum have been changed to vcbLsMod, vcbVBMSt,
  27498.                vcbAllocPtr, vcbNmAlBlks, and vcbNxtCNID respectively.
  27499.  
  27500. QLink points to the next entry in the queue, and qType indicates the queue type,
  27501. which must always be ORD(fsQType). Bit 15 of vcbFlags is set if the volume information
  27502. has been changed by a routine call since the volume was last affected by a FlushVol
  27503. call.
  27504.  
  27505. VCBLsMod contains the date and time that the volume was last modified (this is not
  27506. necessarily when it was flushed).
  27507.  
  27508. 64K ROM note:  VCBLsMod replaces the field vcbLsBkUp from flat directory
  27509.                volumes. The name vcbLsBkUp was actually a misnomer; this
  27510.                field has always contained the date and time of the last
  27511.                modification, not the last backup. Another field, vcbVolBkUp,
  27512.                contains the date and time of the last backup.
  27513.  
  27514. VCBAtrb contains the volume attributes, as follows:
  27515.  
  27516.   Bit    Meaning
  27517.   0–4    Set if inconsistencies were found between the volume
  27518.          information and the file directory when the volume was mounted
  27519.   6      Set if volume is busy (one or more files are open)
  27520.   7      Set if volume is locked by hardware
  27521.   15     Set if volume is locked by software
  27522.  
  27523. VCBVBMSt contains the number of the first block in the volume bit map; on flat volumes,
  27524. it contains the first block of the file directory. VCBNmAlBlks contains the number of
  27525. allocation blocks on the volume, and vcbFreeBks specifies how many of those blocks
  27526. are unused. VCBAlBlSt is used only with flat volumes; it contains the number of the
  27527. first block in the block map.
  27528.  
  27529. VCBDrvNum contains the drive number of the drive on which the volume is mounted;
  27530. vcbDRefNum contains the driver reference number of the driver used to access the
  27531. volume. When a mounted volume is placed off-line, vcbDrvNum is cleared. When a volume
  27532. is ejected, vcbDrvNum is cleared and vcbDRefNum is set to the negative of vcbDrvNum
  27533. (becoming a positive number). VCBFSID identifies the file system handling the volume;
  27534. it’s 0 for volumes handled by the File Manager, and nonzero for volumes handled by
  27535. other file systems.
  27536.  
  27537. When a volume is placed off-line, its buffer and bit map (or block map, in the case
  27538. of flat directory volumes) are released. When a volume is unmounted, its volume
  27539. control block is removed from the volume-control-block queue.
  27540.  
  27541. You can get a pointer to the header of the volume-control-block queue by calling the
  27542. File Manager function GetVCBQHdr.
  27543.  
  27544. æKY DrvQEl
  27545. DrvQElPtr
  27546. æFc Files.h
  27547. æT struct
  27548. æD struct DrvQEl {
  27549.     QElemPtr qLink;
  27550.     short qType;
  27551.     short dQDrive;
  27552.     short dQRefNum;
  27553.     short dQFSID;
  27554.     unsigned short dQDrvSz;
  27555.     unsigned short dQDrvSz2;
  27556. };
  27557.  
  27558. typedef struct DrvQEl DrvQEl;
  27559. typedef DrvQEl *DrvQElPtr;
  27560. æC 
  27561. »The Drive Queue
  27562.  
  27563. •••Refer to Technical Note #36:•••
  27564.  
  27565. Disk drives connected to the Macintosh are opened when the system starts up, and
  27566. information describing each is placed in the drive queue. This is a standard Operating
  27567. System queue, and each entry in it has the following structure:
  27568.  
  27569. TYPE DrvQEl =  RECORD
  27570.                  qLink:     QElemPtr;   {next queue entry}
  27571.                  qType:     INTEGER;    {queue type}
  27572.                  dQDrive:   INTEGER;    {drive number}
  27573.                  dQRefNum:  INTEGER;    {driver reference number}
  27574.                  dQFSID:    INTEGER;    {file-system identifier}
  27575.                  dQDrvSz:   INTEGER;    {number of logical blocks on drive}
  27576.                  dQDrvSz2:  INTEGER;    {additional field to handle large }
  27577.                                         { drive size}
  27578.                END;
  27579.  
  27580. QLink points to the next entry in the queue. If qType is 0, this means the number of
  27581. logical blocks on the drive is contained in the dQDrvSz field alone. If qType is 1,
  27582. both dQDrvSz and dQDrvSz2 are used to store the number of blocks; dqDrvSz2 contains
  27583. the high-order word of this number and dQDrvSz contains the low-order word.
  27584.  
  27585. DQDrive contains the drive number of the drive on which the volume is mounted; dQRefNum
  27586. contains the driver reference number of the driver controlling the device on which
  27587. the volume is mounted. DQFSID identifies the file system handling the volume in the
  27588. drive; it’s 0 for volumes handled by the File Manager, and nonzero for volumes handled
  27589. by other file systems.
  27590.  
  27591. Four bytes of flags precede each drive queue entry; they’re accessible only from
  27592. assembly language.
  27593.  
  27594. Assembly-language note:  These bytes contain the following:
  27595.  
  27596.                            Byte    Contents
  27597.                            0       Bit 7=1 if volume is locked
  27598.                            1       0 if no disk in drive; 1 or 2 if disk
  27599.                                    in drive; 8 if nonejectable disk in drive;
  27600.                                    $FC-$FF if disk was ejected within last 1.5
  27601.                                    seconds; $48 if disk in drive is
  27602.                                    nonejectable but driver wants a call
  27603.                            2       Used internally during system startup
  27604.                            3       Bit 7=0 if disk is single-sided
  27605.  
  27606. You can get a pointer to the header of the drive queue by calling the File Manager
  27607. function GetDrvQHdr.
  27608.  
  27609. æKY NumVersion
  27610. æFc Files.h
  27611. æT struct
  27612. æD struct NumVersion {
  27613.     unsigned char majorRev; /*1st part of version number in BCD*/
  27614.     unsigned int minorRev : 4; /*2nd part is 1 nibble in BCD*/
  27615.     unsigned int bugFixRev : 4; /*3rd part is 1 nibble in BCD*/
  27616.     unsigned char stage; /*stage code: dev, alpha, beta, final*/
  27617.     unsigned char nonRelRev; /*revision level of non-released version*/
  27618. };
  27619.  
  27620. typedef struct NumVersion NumVersion;
  27621. æC 
  27622.  
  27623. æKY VersRec
  27624. VersRecPtr
  27625. VersRecHndl
  27626. æFc Files.h
  27627. æT struct
  27628. æD struct VersRec {
  27629.     NumVersion numericVersion; /*encoded version number*/
  27630.     short countryCode; /*country code from intl utilities*/
  27631.     Str255 shortVersion; /*version number string - worst case*/
  27632.     Str255 reserved; /*longMessage string packed after shortVersion*/
  27633. };
  27634.  
  27635. typedef struct VersRec VersRec;
  27636. typedef VersRec *VersRecPtr, **VersRecHndl;
  27637. æC 
  27638.  
  27639. æKY PBOpen
  27640. æFc Files.h
  27641. æT Function
  27642. æD pascal OSErr PBOpen(ParmBlkPtr paramBlock,Boolean async); 
  27643. æDT OSErr myVariable = PBOpen((ParmBlkPtr) paramBlock,(Boolean) async);
  27644. æRI II-108
  27645. æC 
  27646. Trap macro    _Open
  27647.  
  27648. Parameter block
  27649.   -->    12    ioCompletion  pointer
  27650.   <--    16    ioResult      word
  27651.   -->    18    ioNamePtr     pointer
  27652.   -->    22    ioVRefNum     word
  27653.   <--    24    ioRefNum      word
  27654.   -->    26    ioVersNum     byte
  27655.   -->    27    ioPermssn     byte
  27656.   -->    28    ioMisc        pointer
  27657.  
  27658. PBOpen creates an access path to the file having the name pointed to by ioNamePtr
  27659. (and on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  27660. A path reference number is returned in ioRefNum.
  27661.  
  27662. IOMisc either points to a portion of memory (522 bytes) to be used as the access
  27663. path’s buffer, or is NIL if you want the volume buffer to be used instead.
  27664.  
  27665. Warning:  All access paths to a single file that’s opened multiple times
  27666.           should share the same buffer so that they will read and write
  27667.           the same data.
  27668.  
  27669. IOPermssn specifies the path’s read/write permission. A path can be opened for writing
  27670. even if it accesses a file on a locked volume, and an error won’t be returned until a
  27671. PBWrite, PBSetEOF, or PBAllocate call is made.
  27672.  
  27673. If you attempt to open a locked file for writing, PBOpen will return permErr as its
  27674. function result. If you request exclusive read/write permission but another access
  27675. path already has write permission (whether write only, exclusive
  27676. read/write, or shared read/write), PBOpen will return the reference number of the
  27677. existing access path in ioRefNum and opWrErr as its function result. Similarly, if
  27678. you request shared read/write permission but another access path already has exclusive
  27679. read/write permission, PBOpen will return the reference number of the access path in
  27680. ioRefNum and opWrErr as its function result.
  27681.  
  27682. Result codes    noErr     No error
  27683.                 bdNamErr  Bad file name
  27684.                 extFSErr  External file system
  27685.                 fnfErr    File not found
  27686.                 ioErr     I/O error
  27687.                 nsvErr    No such volume
  27688.                 opWrErr   File already open for writing
  27689.                 permErr   Attempt to open locked file for writing
  27690.                 tmfoErr   Too many files open
  27691.  
  27692. æKY PBOpenSync
  27693. æFc Files.h
  27694. æT Function
  27695. æTN A000
  27696. æD #pragma parameter __D0 PBOpenSync(__A0)
  27697. pascal OSErr PBOpenSync(ParmBlkPtr paramBlock)
  27698.     = 0xA000; 
  27699. æDT #pragma parameter __D0 myVariable = PBOpenSync()(__A0);
  27700. æRI II-108
  27701. æC 
  27702. Trap macro    _Open
  27703.  
  27704. Parameter block
  27705.   -->    12    ioCompletion  pointer
  27706.   <--    16    ioResult      word
  27707.   -->    18    ioNamePtr     pointer
  27708.   -->    22    ioVRefNum     word
  27709.   <--    24    ioRefNum      word
  27710.   -->    26    ioVersNum     byte
  27711.   -->    27    ioPermssn     byte
  27712.   -->    28    ioMisc        pointer
  27713.  
  27714. PBOpen creates an access path to the file having the name pointed to by ioNamePtr
  27715. (and on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  27716. A path reference number is returned in ioRefNum.
  27717.  
  27718. IOMisc either points to a portion of memory (522 bytes) to be used as the access
  27719. path’s buffer, or is NIL if you want the volume buffer to be used instead.
  27720.  
  27721. Warning:  All access paths to a single file that’s opened multiple times
  27722.           should share the same buffer so that they will read and write
  27723.           the same data.
  27724.  
  27725. IOPermssn specifies the path’s read/write permission. A path can be opened for writing
  27726. even if it accesses a file on a locked volume, and an error won’t be returned until a
  27727. PBWrite, PBSetEOF, or PBAllocate call is made.
  27728.  
  27729. If you attempt to open a locked file for writing, PBOpen will return permErr as its
  27730. function result. If you request exclusive read/write permission but another access
  27731. path already has write permission (whether write only, exclusive
  27732. read/write, or shared read/write), PBOpen will return the reference number of the
  27733. existing access path in ioRefNum and opWrErr as its function result. Similarly, if
  27734. you request shared read/write permission but another access path already has exclusive
  27735. read/write permission, PBOpen will return the reference number of the access path in
  27736. ioRefNum and opWrErr as its function result.
  27737.  
  27738. Result codes    noErr     No error
  27739.                 bdNamErr  Bad file name
  27740.                 extFSErr  External file system
  27741.                 fnfErr    File not found
  27742.                 ioErr     I/O error
  27743.                 nsvErr    No such volume
  27744.                 opWrErr   File already open for writing
  27745.                 permErr   Attempt to open locked file for writing
  27746.                 tmfoErr   Too many files open
  27747.  
  27748. æKY PBOpenAsync
  27749. æFc Files.h
  27750. æT Function
  27751. æTN A400
  27752. æD #pragma parameter __D0 PBOpenAsync(__A0)
  27753. pascal OSErr PBOpenAsync(ParmBlkPtr paramBlock)
  27754.     = 0xA400; 
  27755. æDT #pragma parameter __D0 myVariable = PBOpenAsync()(__A0);
  27756. æRI II-108
  27757. æC 
  27758. Trap macro    _Open
  27759.  
  27760. Parameter block
  27761.   -->    12    ioCompletion  pointer
  27762.   <--    16    ioResult      word
  27763.   -->    18    ioNamePtr     pointer
  27764.   -->    22    ioVRefNum     word
  27765.   <--    24    ioRefNum      word
  27766.   -->    26    ioVersNum     byte
  27767.   -->    27    ioPermssn     byte
  27768.   -->    28    ioMisc        pointer
  27769.  
  27770. PBOpen creates an access path to the file having the name pointed to by ioNamePtr
  27771. (and on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  27772. A path reference number is returned in ioRefNum.
  27773.  
  27774. IOMisc either points to a portion of memory (522 bytes) to be used as the access
  27775. path’s buffer, or is NIL if you want the volume buffer to be used instead.
  27776.  
  27777. Warning:  All access paths to a single file that’s opened multiple times
  27778.           should share the same buffer so that they will read and write
  27779.           the same data.
  27780.  
  27781. IOPermssn specifies the path’s read/write permission. A path can be opened for writing
  27782. even if it accesses a file on a locked volume, and an error won’t be returned until a
  27783. PBWrite, PBSetEOF, or PBAllocate call is made.
  27784.  
  27785. If you attempt to open a locked file for writing, PBOpen will return permErr as its
  27786. function result. If you request exclusive read/write permission but another access
  27787. path already has write permission (whether write only, exclusive
  27788. read/write, or shared read/write), PBOpen will return the reference number of the
  27789. existing access path in ioRefNum and opWrErr as its function result. Similarly, if
  27790. you request shared read/write permission but another access path already has exclusive
  27791. read/write permission, PBOpen will return the reference number of the access path in
  27792. ioRefNum and opWrErr as its function result.
  27793.  
  27794. Result codes    noErr     No error
  27795.                 bdNamErr  Bad file name
  27796.                 extFSErr  External file system
  27797.                 fnfErr    File not found
  27798.                 ioErr     I/O error
  27799.                 nsvErr    No such volume
  27800.                 opWrErr   File already open for writing
  27801.                 permErr   Attempt to open locked file for writing
  27802.                 tmfoErr   Too many files open
  27803.  
  27804. æKY PBClose
  27805. æFc Files.h
  27806. æT Function
  27807. æD pascal OSErr PBClose(ParmBlkPtr paramBlock,Boolean async); 
  27808. æDT OSErr myVariable = PBClose((ParmBlkPtr) paramBlock,(Boolean) async);
  27809. æRI II-114
  27810. æC 
  27811. Trap macro     _Close
  27812.  
  27813. Parameter block
  27814.   -->    12    ioCompletion  pointer
  27815.   <--    16    ioResult      word
  27816.   -->    24    ioRefNum      word
  27817.  
  27818. PBClose writes the contents of the access path buffer specified by ioRefNum to the
  27819. volume and removes the access path.
  27820.  
  27821. Warning:  Some information stored on the volume won’t be correct
  27822.           until PBFlushVol is called.
  27823.  
  27824. Result codes    noErr     No error
  27825.                 extFSErr  External file system
  27826.                 fnfErr    File not found
  27827.                 fnOpnErr  File not open
  27828.                 ioErr     I/O error
  27829.                 nsvErr    No such volume
  27830.                 rfNumErr  Bad reference number
  27831.  
  27832. æKY PBCloseSync
  27833. æFc Files.h
  27834. æT Function
  27835. æTN A001
  27836. æD #pragma parameter __D0 PBCloseSync(__A0)
  27837. pascal OSErr PBCloseSync(ParmBlkPtr paramBlock)
  27838.     = 0xA001; 
  27839. æDT #pragma parameter __D0 myVariable = PBCloseSync()(__A0);
  27840. æRI II-114
  27841. æC 
  27842. Trap macro     _Close
  27843.  
  27844. Parameter block
  27845.   -->    12    ioCompletion  pointer
  27846.   <--    16    ioResult      word
  27847.   -->    24    ioRefNum      word
  27848.  
  27849. PBClose writes the contents of the access path buffer specified by ioRefNum to the
  27850. volume and removes the access path.
  27851.  
  27852. Warning:  Some information stored on the volume won’t be correct
  27853.           until PBFlushVol is called.
  27854.  
  27855. Result codes    noErr     No error
  27856.                 extFSErr  External file system
  27857.                 fnfErr    File not found
  27858.                 fnOpnErr  File not open
  27859.                 ioErr     I/O error
  27860.                 nsvErr    No such volume
  27861.                 rfNumErr  Bad reference number
  27862.  
  27863. æKY PBCloseAsync
  27864. æFc Files.h
  27865. æT Function
  27866. æTN A401
  27867. æD #pragma parameter __D0 PBCloseAsync(__A0)
  27868. pascal OSErr PBCloseAsync(ParmBlkPtr paramBlock)
  27869.     = 0xA401; 
  27870. æDT #pragma parameter __D0 myVariable = PBCloseAsync()(__A0);
  27871. æRI II-114
  27872. æC 
  27873. Trap macro     _Close
  27874.  
  27875. Parameter block
  27876.   -->    12    ioCompletion  pointer
  27877.   <--    16    ioResult      word
  27878.   -->    24    ioRefNum      word
  27879.  
  27880. PBClose writes the contents of the access path buffer specified by ioRefNum to the
  27881. volume and removes the access path.
  27882.  
  27883. Warning:  Some information stored on the volume won’t be correct
  27884.           until PBFlushVol is called.
  27885.  
  27886. Result codes    noErr     No error
  27887.                 extFSErr  External file system
  27888.                 fnfErr    File not found
  27889.                 fnOpnErr  File not open
  27890.                 ioErr     I/O error
  27891.                 nsvErr    No such volume
  27892.                 rfNumErr  Bad reference number
  27893.  
  27894. æKY PBRead
  27895. æFc Files.h
  27896. æT Function
  27897. æD pascal OSErr PBRead(ParmBlkPtr paramBlock,Boolean async); 
  27898. æDT OSErr myVariable = PBRead((ParmBlkPtr) paramBlock,(Boolean) async);
  27899. æRT 187
  27900. æRI II-110
  27901. æC  
  27902. Trap macro    _Read
  27903.  
  27904. Parameter block
  27905.   -->    12    ioCompletion  pointer
  27906.   <--    16    ioResult      word
  27907.   -->    24    ioRefNum      word
  27908.   -->    32    ioBuffer      pointer
  27909.   -->    36    ioReqCount    long word
  27910.   <--    40    ioActCount    long word
  27911.   -->    44    ioPosMode     word
  27912.   <->    46    ioPosOffset   long word
  27913.  
  27914. PBRead attempts to read ioReqCount bytes from the open file whose access path is
  27915. specified by ioRefNum, and transfer them to the data buffer pointed to by ioBuffer.
  27916. The position of the mark is specified by ioPosMode and ioPosOffset. If you try to
  27917. read past the logical end-of-file, PBRead moves the mark to the end-of-file and
  27918. returns eofErr as its function result. After the read is completed, the mark is
  27919. returned in ioPosOffset and the number of bytes actually read is returned in ioActCount.
  27920.  
  27921. Result codes    noErr     No error
  27922.                 eofErr    End-of-file
  27923.                 extFSErr  External file system
  27924.                 fnOpnErr  File not open
  27925.                 ioErr     I/O error
  27926.                 paramErr  Negative ioReqCount
  27927.                 rfNumErr  Bad reference number
  27928.  
  27929. æKY PBReadSync
  27930. æFc Files.h
  27931. æT Function
  27932. æTN A002
  27933. æD #pragma parameter __D0 PBReadSync(__A0)
  27934. pascal OSErr PBReadSync(ParmBlkPtr paramBlock)
  27935.     = 0xA002; 
  27936. æDT #pragma parameter __D0 myVariable = PBReadSync()(__A0);
  27937. æRT 187
  27938. æRI II-110
  27939. æC  
  27940. Trap macro    _Read
  27941.  
  27942. Parameter block
  27943.   -->    12    ioCompletion  pointer
  27944.   <--    16    ioResult      word
  27945.   -->    24    ioRefNum      word
  27946.   -->    32    ioBuffer      pointer
  27947.   -->    36    ioReqCount    long word
  27948.   <--    40    ioActCount    long word
  27949.   -->    44    ioPosMode     word
  27950.   <->    46    ioPosOffset   long word
  27951.  
  27952. PBRead attempts to read ioReqCount bytes from the open file whose access path is
  27953. specified by ioRefNum, and transfer them to the data buffer pointed to by ioBuffer.
  27954. The position of the mark is specified by ioPosMode and ioPosOffset. If you try to
  27955. read past the logical end-of-file, PBRead moves the mark to the end-of-file and
  27956. returns eofErr as its function result. After the read is completed, the mark is
  27957. returned in ioPosOffset and the number of bytes actually read is returned in ioActCount.
  27958.  
  27959. Result codes    noErr     No error
  27960.                 eofErr    End-of-file
  27961.                 extFSErr  External file system
  27962.                 fnOpnErr  File not open
  27963.                 ioErr     I/O error
  27964.                 paramErr  Negative ioReqCount
  27965.                 rfNumErr  Bad reference number
  27966.  
  27967. æKY PBReadAsync
  27968. æFc Files.h
  27969. æT Function
  27970. æTN A402
  27971. æD #pragma parameter __D0 PBReadAsync(__A0)
  27972. pascal OSErr PBReadAsync(ParmBlkPtr paramBlock)
  27973.     = 0xA402; 
  27974. æDT #pragma parameter __D0 myVariable = PBReadAsync()(__A0);
  27975. æRT 187
  27976. æRI II-110
  27977. æC  
  27978. Trap macro    _Read
  27979.  
  27980. Parameter block
  27981.   -->    12    ioCompletion  pointer
  27982.   <--    16    ioResult      word
  27983.   -->    24    ioRefNum      word
  27984.   -->    32    ioBuffer      pointer
  27985.   -->    36    ioReqCount    long word
  27986.   <--    40    ioActCount    long word
  27987.   -->    44    ioPosMode     word
  27988.   <->    46    ioPosOffset   long word
  27989.  
  27990. PBRead attempts to read ioReqCount bytes from the open file whose access path is
  27991. specified by ioRefNum, and transfer them to the data buffer pointed to by ioBuffer.
  27992. The position of the mark is specified by ioPosMode and ioPosOffset. If you try to
  27993. read past the logical end-of-file, PBRead moves the mark to the end-of-file and
  27994. returns eofErr as its function result. After the read is completed, the mark is
  27995. returned in ioPosOffset and the number of bytes actually read is returned in ioActCount.
  27996.  
  27997. Result codes    noErr     No error
  27998.                 eofErr    End-of-file
  27999.                 extFSErr  External file system
  28000.                 fnOpnErr  File not open
  28001.                 ioErr     I/O error
  28002.                 paramErr  Negative ioReqCount
  28003.                 rfNumErr  Bad reference number
  28004.  
  28005. æKY PBWrite
  28006. æFc Files.h
  28007. æT Function
  28008. æD pascal OSErr PBWrite(ParmBlkPtr paramBlock,Boolean async); 
  28009. æDT OSErr myVariable = PBWrite((ParmBlkPtr) paramBlock,(Boolean) async);
  28010. æRT 187
  28011. æRI II-110
  28012. æC 
  28013.  
  28014. •••Refer to Technical Note #187:•••
  28015.  
  28016. Trap macro    _Write
  28017.  
  28018. Parameter block
  28019.   -->    12    ioCompletion  pointer
  28020.   <--    16    ioResult      word
  28021.   -->    24    ioRefNum      word
  28022.   -->    32    ioBuffer      pointer
  28023.   -->    36    ioReqCount    long word
  28024.   <--    40    ioActCount    long word
  28025.   -->    44    ioPosMode     word
  28026.   <->    46    ioPosOffset   long word
  28027.  
  28028. PBWrite takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to
  28029. write them to the open file whose access path is specified by ioRefNum. The position
  28030. of the mark is specified by ioPosMode and ioPosOffset. After the write is completed,
  28031. the mark is returned in ioPosOffset and the number of bytes actually written is
  28032. returned in ioActCount.
  28033.  
  28034. Result codes    noErr      No error
  28035.                 dskFulErr  Disk full
  28036.                 fLckdErr   File locked
  28037.                 fnOpnErr   File not open
  28038.                 ioErr      I/O error
  28039.                 paramErr   Negative ioReqCount
  28040.                 posErr     Attempt to position before start of file
  28041.                 rfNumErr   Bad reference number
  28042.                 vLckdErr   Software volume lock
  28043.                 wPrErr     Hardware volume lock
  28044.                 wrPermErr  Read/write permission doesn’t allow writing
  28045.  
  28046. æKY PBWriteSync
  28047. æFc Files.h
  28048. æT Function
  28049. æTN A003
  28050. æD #pragma parameter __D0 PBWriteSync(__A0)
  28051. pascal OSErr PBWriteSync(ParmBlkPtr paramBlock)
  28052.     = 0xA003; 
  28053. æDT #pragma parameter __D0 myVariable = PBWriteSync()(__A0);
  28054. æRT 187
  28055. æRI II-110
  28056. æC 
  28057.  
  28058. •••Refer to Technical Note #187:•••
  28059.  
  28060. Trap macro    _Write
  28061.  
  28062. Parameter block
  28063.   -->    12    ioCompletion  pointer
  28064.   <--    16    ioResult      word
  28065.   -->    24    ioRefNum      word
  28066.   -->    32    ioBuffer      pointer
  28067.   -->    36    ioReqCount    long word
  28068.   <--    40    ioActCount    long word
  28069.   -->    44    ioPosMode     word
  28070.   <->    46    ioPosOffset   long word
  28071.  
  28072. PBWrite takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to
  28073. write them to the open file whose access path is specified by ioRefNum. The position
  28074. of the mark is specified by ioPosMode and ioPosOffset. After the write is completed,
  28075. the mark is returned in ioPosOffset and the number of bytes actually written is
  28076. returned in ioActCount.
  28077.  
  28078. Result codes    noErr      No error
  28079.                 dskFulErr  Disk full
  28080.                 fLckdErr   File locked
  28081.                 fnOpnErr   File not open
  28082.                 ioErr      I/O error
  28083.                 paramErr   Negative ioReqCount
  28084.                 posErr     Attempt to position before start of file
  28085.                 rfNumErr   Bad reference number
  28086.                 vLckdErr   Software volume lock
  28087.                 wPrErr     Hardware volume lock
  28088.                 wrPermErr  Read/write permission doesn’t allow writing
  28089.  
  28090. æKY PBWriteAsync
  28091. æFc Files.h
  28092. æT Function
  28093. æTN A403
  28094. æD #pragma parameter __D0 PBWriteAsync(__A0)
  28095. pascal OSErr PBWriteAsync(ParmBlkPtr paramBlock)
  28096.     = 0xA403; 
  28097. æDT #pragma parameter __D0 myVariable = PBWriteAsync()(__A0);
  28098. æRT 187
  28099. æRI II-110
  28100. æC 
  28101.  
  28102. •••Refer to Technical Note #187:•••
  28103.  
  28104. Trap macro    _Write
  28105.  
  28106. Parameter block
  28107.   -->    12    ioCompletion  pointer
  28108.   <--    16    ioResult      word
  28109.   -->    24    ioRefNum      word
  28110.   -->    32    ioBuffer      pointer
  28111.   -->    36    ioReqCount    long word
  28112.   <--    40    ioActCount    long word
  28113.   -->    44    ioPosMode     word
  28114.   <->    46    ioPosOffset   long word
  28115.  
  28116. PBWrite takes ioReqCount bytes from the buffer pointed to by ioBuffer and attempts to
  28117. write them to the open file whose access path is specified by ioRefNum. The position
  28118. of the mark is specified by ioPosMode and ioPosOffset. After the write is completed,
  28119. the mark is returned in ioPosOffset and the number of bytes actually written is
  28120. returned in ioActCount.
  28121.  
  28122. Result codes    noErr      No error
  28123.                 dskFulErr  Disk full
  28124.                 fLckdErr   File locked
  28125.                 fnOpnErr   File not open
  28126.                 ioErr      I/O error
  28127.                 paramErr   Negative ioReqCount
  28128.                 posErr     Attempt to position before start of file
  28129.                 rfNumErr   Bad reference number
  28130.                 vLckdErr   Software volume lock
  28131.                 wPrErr     Hardware volume lock
  28132.                 wrPermErr  Read/write permission doesn’t allow writing
  28133.  
  28134. æKY PBGetVInfo
  28135. æFc Files.h
  28136. æT Function
  28137. æD pascal OSErr PBGetVInfo(ParmBlkPtr paramBlock,Boolean async); 
  28138. æDT OSErr myVariable = PBGetVInfo((ParmBlkPtr) paramBlock,(Boolean) async);
  28139. æRT 24, 44, 157
  28140. æRI II-104, IV-129, N24-1, N44-2, N157
  28141. æC 
  28142. Trap macro    _GetVolInfo
  28143.  
  28144. Parameter block
  28145.   -->    12    ioCompletion  pointer
  28146.   <--    16    ioResult      word
  28147.   <->    18    ioNamePtr     pointer
  28148.   <->    22    ioVRefNum     word
  28149.   -->    28    ioVolIndex    word
  28150.   <--    30    ioVCrDate     long word
  28151.   <--    34    ioVLsBkUp     long word
  28152.   <--    38    ioVAtrb       word
  28153.   <--    40    ioVNmFls      word
  28154.   <--    42    ioVDirSt      word
  28155.   <--    44    ioVBlLn       word
  28156.   <--    46    ioVNmAlBlks   word
  28157.   <--    48    ioVAlBlkSiz   long word
  28158.   <--    52    ioVClpSiz     long word
  28159.   <--    56    ioAlBlSt      word
  28160.   <--    58    ioVNxtFNum    long word
  28161.   <--    62    ioVFrBlk      word
  28162.  
  28163. PBGetVInfo returns information about the specified volume. If ioVolIndex is positive,
  28164. the File Manager attempts to use it to find the volume; for instance, if ioVolIndex
  28165. is 2, the File Manager will attempt to access the second mounted volume. If ioVolIndex
  28166. is negative, the File Manager uses ioNamePtr and ioVRefNum in the standard way (described
  28167. in the section “Specifying Volumes, Directories, and Files”) to determine which
  28168. volume. If ioVolIndex is 0, the File Manager attempts to access the volume by using
  28169. ioVRefNum only. The volume reference number is returned in ioVRefNum, and a pointer
  28170. to the volume name is returned in ioNamePtr (unless ioNamePtr is NIL).
  28171.  
  28172. If a working directory reference number is passed in ioVRefNum (or if the default
  28173. directory is a subdirectory), the number of files and directories in the specified
  28174. directory (the directory’s valence) will be returned in ioVNmFls. Also, the volume
  28175. reference number won’t be returned; ioVRefNum will still contain the working directory
  28176. reference number.
  28177.  
  28178. Warning:  IOVNmAlBlks and ioVFrBlks, which are actually unsigned integers,
  28179.           are clipped to 31744 ($7C00) regardless of the size of the volume.
  28180.  
  28181. Result codes    noErr       No error
  28182.                 nsvErr      No such volume
  28183.                 paramErr    No default volume
  28184.  
  28185. æKY PBGetVInfoSync
  28186. æFc Files.h
  28187. æT Function
  28188. æTN A007
  28189. æD #pragma parameter __D0 PBGetVInfoSync(__A0)
  28190. pascal OSErr PBGetVInfoSync(ParmBlkPtr paramBlock)
  28191.     = 0xA007; 
  28192. æDT #pragma parameter __D0 myVariable = PBGetVInfoSync()(__A0);
  28193. æRT 24, 44, 157
  28194. æRI II-104, IV-129, N24-1, N44-2, N157
  28195. æC 
  28196. Trap macro    _GetVolInfo
  28197.  
  28198. Parameter block
  28199.   -->    12    ioCompletion  pointer
  28200.   <--    16    ioResult      word
  28201.   <->    18    ioNamePtr     pointer
  28202.   <->    22    ioVRefNum     word
  28203.   -->    28    ioVolIndex    word
  28204.   <--    30    ioVCrDate     long word
  28205.   <--    34    ioVLsBkUp     long word
  28206.   <--    38    ioVAtrb       word
  28207.   <--    40    ioVNmFls      word
  28208.   <--    42    ioVDirSt      word
  28209.   <--    44    ioVBlLn       word
  28210.   <--    46    ioVNmAlBlks   word
  28211.   <--    48    ioVAlBlkSiz   long word
  28212.   <--    52    ioVClpSiz     long word
  28213.   <--    56    ioAlBlSt      word
  28214.   <--    58    ioVNxtFNum    long word
  28215.   <--    62    ioVFrBlk      word
  28216.  
  28217. PBGetVInfo returns information about the specified volume. If ioVolIndex is positive,
  28218. the File Manager attempts to use it to find the volume; for instance, if ioVolIndex
  28219. is 2, the File Manager will attempt to access the second mounted volume. If ioVolIndex
  28220. is negative, the File Manager uses ioNamePtr and ioVRefNum in the standard way (described
  28221. in the section “Specifying Volumes, Directories, and Files”) to determine which
  28222. volume. If ioVolIndex is 0, the File Manager attempts to access the volume by using
  28223. ioVRefNum only. The volume reference number is returned in ioVRefNum, and a pointer
  28224. to the volume name is returned in ioNamePtr (unless ioNamePtr is NIL).
  28225.  
  28226. If a working directory reference number is passed in ioVRefNum (or if the default
  28227. directory is a subdirectory), the number of files and directories in the specified
  28228. directory (the directory’s valence) will be returned in ioVNmFls. Also, the volume
  28229. reference number won’t be returned; ioVRefNum will still contain the working directory
  28230. reference number.
  28231.  
  28232. Warning:  IOVNmAlBlks and ioVFrBlks, which are actually unsigned integers,
  28233.           are clipped to 31744 ($7C00) regardless of the size of the volume.
  28234.  
  28235. Result codes    noErr       No error
  28236.                 nsvErr      No such volume
  28237.                 paramErr    No default volume
  28238.  
  28239. æKY PBGetVInfoAsync
  28240. æFc Files.h
  28241. æT Function
  28242. æTN A407
  28243. æD #pragma parameter __D0 PBGetVInfoAsync(__A0)
  28244. pascal OSErr PBGetVInfoAsync(ParmBlkPtr paramBlock)
  28245.     = 0xA407; 
  28246. æDT #pragma parameter __D0 myVariable = PBGetVInfoAsync()(__A0);
  28247. æRT 24, 44, 157
  28248. æRI II-104, IV-129, N24-1, N44-2, N157
  28249. æC 
  28250. Trap macro    _GetVolInfo
  28251.  
  28252. Parameter block
  28253.   -->    12    ioCompletion  pointer
  28254.   <--    16    ioResult      word
  28255.   <->    18    ioNamePtr     pointer
  28256.   <->    22    ioVRefNum     word
  28257.   -->    28    ioVolIndex    word
  28258.   <--    30    ioVCrDate     long word
  28259.   <--    34    ioVLsBkUp     long word
  28260.   <--    38    ioVAtrb       word
  28261.   <--    40    ioVNmFls      word
  28262.   <--    42    ioVDirSt      word
  28263.   <--    44    ioVBlLn       word
  28264.   <--    46    ioVNmAlBlks   word
  28265.   <--    48    ioVAlBlkSiz   long word
  28266.   <--    52    ioVClpSiz     long word
  28267.   <--    56    ioAlBlSt      word
  28268.   <--    58    ioVNxtFNum    long word
  28269.   <--    62    ioVFrBlk      word
  28270.  
  28271. PBGetVInfo returns information about the specified volume. If ioVolIndex is positive,
  28272. the File Manager attempts to use it to find the volume; for instance, if ioVolIndex
  28273. is 2, the File Manager will attempt to access the second mounted volume. If ioVolIndex
  28274. is negative, the File Manager uses ioNamePtr and ioVRefNum in the standard way (described
  28275. in the section “Specifying Volumes, Directories, and Files”) to determine which
  28276. volume. If ioVolIndex is 0, the File Manager attempts to access the volume by using
  28277. ioVRefNum only. The volume reference number is returned in ioVRefNum, and a pointer
  28278. to the volume name is returned in ioNamePtr (unless ioNamePtr is NIL).
  28279.  
  28280. If a working directory reference number is passed in ioVRefNum (or if the default
  28281. directory is a subdirectory), the number of files and directories in the specified
  28282. directory (the directory’s valence) will be returned in ioVNmFls. Also, the volume
  28283. reference number won’t be returned; ioVRefNum will still contain the working directory
  28284. reference number.
  28285.  
  28286. Warning:  IOVNmAlBlks and ioVFrBlks, which are actually unsigned integers,
  28287.           are clipped to 31744 ($7C00) regardless of the size of the volume.
  28288.  
  28289. Result codes    noErr       No error
  28290.                 nsvErr      No such volume
  28291.                 paramErr    No default volume
  28292.  
  28293. æKY PBGetVol
  28294. æFc Files.h
  28295. æT Function
  28296. æD pascal OSErr PBGetVol(ParmBlkPtr paramBlock,Boolean async); 
  28297. æDT OSErr myVariable = PBGetVol((ParmBlkPtr) paramBlock,(Boolean) async);
  28298. æRI II-104, IV-131
  28299. æC 
  28300. Trap macro    _GetVol
  28301.  
  28302. Parameter block
  28303.   -->    12    ioCompletion  pointer
  28304.   <--    16    ioResult      word
  28305.   <--    18    ioNamePtr     pointer
  28306.   <--    22    ioVRefNum     word
  28307.  
  28308. PBGetVol returns a pointer to the name of the default volume in ioNamePtr
  28309. (unless ioNamePtr is NIL) and its volume reference number in ioVRefNum. If a default
  28310. directory was set with a previous PBSetVol call, a pointer to its name will be returned
  28311. in ioNamePtr and its working directory reference number in ioVRefNum.
  28312.  
  28313. Result codes    noErr     No error
  28314.                 nsvErr    No default volume
  28315.  
  28316. æKY PBGetVolSync
  28317. æFc Files.h
  28318. æT Function
  28319. æTN A014
  28320. æD #pragma parameter __D0 PBGetVolSync(__A0)
  28321. pascal OSErr PBGetVolSync(ParmBlkPtr paramBlock)
  28322.     = 0xA014; 
  28323. æDT #pragma parameter __D0 myVariable = PBGetVolSync()(__A0);
  28324. æRI II-104, IV-131
  28325. æC 
  28326. Trap macro    _GetVol
  28327.  
  28328. Parameter block
  28329.   -->    12    ioCompletion  pointer
  28330.   <--    16    ioResult      word
  28331.   <--    18    ioNamePtr     pointer
  28332.   <--    22    ioVRefNum     word
  28333.  
  28334. PBGetVol returns a pointer to the name of the default volume in ioNamePtr
  28335. (unless ioNamePtr is NIL) and its volume reference number in ioVRefNum. If a default
  28336. directory was set with a previous PBSetVol call, a pointer to its name will be returned
  28337. in ioNamePtr and its working directory reference number in ioVRefNum.
  28338.  
  28339. Result codes    noErr     No error
  28340.                 nsvErr    No default volume
  28341.  
  28342. æKY PBGetVolAsync
  28343. æFc Files.h
  28344. æT Function
  28345. æTN A414
  28346. æD #pragma parameter __D0 PBGetVolAsync(__A0)
  28347. pascal OSErr PBGetVolAsync(ParmBlkPtr paramBlock)
  28348.     = 0xA414; 
  28349. æDT #pragma parameter __D0 myVariable = PBGetVolAsync()(__A0);
  28350. æRI II-104, IV-131
  28351. æC 
  28352. Trap macro    _GetVol
  28353.  
  28354. Parameter block
  28355.   -->    12    ioCompletion  pointer
  28356.   <--    16    ioResult      word
  28357.   <--    18    ioNamePtr     pointer
  28358.   <--    22    ioVRefNum     word
  28359.  
  28360. PBGetVol returns a pointer to the name of the default volume in ioNamePtr
  28361. (unless ioNamePtr is NIL) and its volume reference number in ioVRefNum. If a default
  28362. directory was set with a previous PBSetVol call, a pointer to its name will be returned
  28363. in ioNamePtr and its working directory reference number in ioVRefNum.
  28364.  
  28365. Result codes    noErr     No error
  28366.                 nsvErr    No default volume
  28367.  
  28368. æKY PBSetVol
  28369. æFc Files.h
  28370. æT Function
  28371. æD pascal OSErr PBSetVol(ParmBlkPtr paramBlock,Boolean async); 
  28372. æDT OSErr myVariable = PBSetVol((ParmBlkPtr) paramBlock,(Boolean) async);
  28373. æRI II-105,  IV-132
  28374. æC 
  28375. Trap macro    _SetVol
  28376.  
  28377. Parameter block
  28378.   -->    12    ioCompletion  pointer
  28379.   <--    16    ioResult      word
  28380.   -->    18    ioNamePtr     pointer
  28381.   -->    22    ioVRefNum     word
  28382.  
  28383. PBSetVol sets the default volume to the mounted volume specified by ioNamePtr or
  28384. ioVRefNum. On hierarchical volumes, PBSetVol also sets the root directory as the
  28385. default directory.
  28386.  
  28387. Result codes    noErr     No error
  28388.                 bdNamErr  Bad volume name
  28389.                 nsvErr    No such volume
  28390.                 paramErr  No default volume
  28391.  
  28392. æKY PBSetVolSync
  28393. æFc Files.h
  28394. æT Function
  28395. æTN A015
  28396. æD #pragma parameter __D0 PBSetVolSync(__A0)
  28397. pascal OSErr PBSetVolSync(ParmBlkPtr paramBlock)
  28398.     = 0xA015; 
  28399. æDT #pragma parameter __D0 myVariable = PBSetVolSync()(__A0);
  28400. æRI II-105,  IV-132
  28401. æC 
  28402. Trap macro    _SetVol
  28403.  
  28404. Parameter block
  28405.   -->    12    ioCompletion  pointer
  28406.   <--    16    ioResult      word
  28407.   -->    18    ioNamePtr     pointer
  28408.   -->    22    ioVRefNum     word
  28409.  
  28410. PBSetVol sets the default volume to the mounted volume specified by ioNamePtr or
  28411. ioVRefNum. On hierarchical volumes, PBSetVol also sets the root directory as the
  28412. default directory.
  28413.  
  28414. Result codes    noErr     No error
  28415.                 bdNamErr  Bad volume name
  28416.                 nsvErr    No such volume
  28417.                 paramErr  No default volume
  28418.  
  28419. æKY PBSetVolAsync
  28420. æFc Files.h
  28421. æT Function
  28422. æTN A415
  28423. æD #pragma parameter __D0 PBSetVolAsync(__A0)
  28424. pascal OSErr PBSetVolAsync(ParmBlkPtr paramBlock)
  28425.     = 0xA415; 
  28426. æDT #pragma parameter __D0 myVariable = PBSetVolAsync()(__A0);
  28427. æRI II-105,  IV-132
  28428. æC 
  28429. Trap macro    _SetVol
  28430.  
  28431. Parameter block
  28432.   -->    12    ioCompletion  pointer
  28433.   <--    16    ioResult      word
  28434.   -->    18    ioNamePtr     pointer
  28435.   -->    22    ioVRefNum     word
  28436.  
  28437. PBSetVol sets the default volume to the mounted volume specified by ioNamePtr or
  28438. ioVRefNum. On hierarchical volumes, PBSetVol also sets the root directory as the
  28439. default directory.
  28440.  
  28441. Result codes    noErr     No error
  28442.                 bdNamErr  Bad volume name
  28443.                 nsvErr    No such volume
  28444.                 paramErr  No default volume
  28445.  
  28446. æKY PBFlushVol
  28447. æFc Files.h
  28448. æT Function
  28449. æD pascal OSErr PBFlushVol(ParmBlkPtr paramBlock,Boolean async); 
  28450. æDT OSErr myVariable = PBFlushVol((ParmBlkPtr) paramBlock,(Boolean) async);
  28451. æMM
  28452. æRI II-105, IV-133
  28453. æC 
  28454. Trap macro    _FlushVol
  28455.  
  28456. Parameter block
  28457.   -->    12    ioCompletion  pointer
  28458.   <--    16    ioResult      word
  28459.   -->    18    ioNamePtr     pointer
  28460.   -->    22    ioVRefNum     word
  28461.  
  28462. On the volume specified by ioNamePtr or ioVRefNum, PBFlushVol writes descriptive
  28463. information about the volume, the contents of the associated volume buffer, and all
  28464. access path buffers for the volume (if they’ve changed since the last time PBFlushVol
  28465. was called).
  28466.  
  28467. Note:  The date and time of the last modification to the volume are set
  28468.        when the modification is made, not when the volume is flushed.
  28469.  
  28470. Result codes    noErr     No error
  28471.                 bdNamErr  Bad volume name
  28472.                 extFSErr  External file system
  28473.                 ioErr     I/O error
  28474.                 nsDrvErr  No such drive
  28475.                 nsvErr    No such volume
  28476.                 paramErr  No default volume
  28477.  
  28478. æKY PBFlushVolSync
  28479. æFc Files.h
  28480. æT Function
  28481. æTN A013
  28482. æD #pragma parameter __D0 PBFlushVolSync(__A0)
  28483. pascal OSErr PBFlushVolSync(ParmBlkPtr paramBlock)
  28484.     = 0xA013; 
  28485. æDT #pragma parameter __D0 myVariable = PBFlushVolSync()(__A0);
  28486. æMM
  28487. æRI II-105, IV-133
  28488. æC 
  28489. Trap macro    _FlushVol
  28490.  
  28491. Parameter block
  28492.   -->    12    ioCompletion  pointer
  28493.   <--    16    ioResult      word
  28494.   -->    18    ioNamePtr     pointer
  28495.   -->    22    ioVRefNum     word
  28496.  
  28497. On the volume specified by ioNamePtr or ioVRefNum, PBFlushVol writes descriptive
  28498. information about the volume, the contents of the associated volume buffer, and all
  28499. access path buffers for the volume (if they’ve changed since the last time PBFlushVol
  28500. was called).
  28501.  
  28502. Note:  The date and time of the last modification to the volume are set
  28503.        when the modification is made, not when the volume is flushed.
  28504.  
  28505. Result codes    noErr     No error
  28506.                 bdNamErr  Bad volume name
  28507.                 extFSErr  External file system
  28508.                 ioErr     I/O error
  28509.                 nsDrvErr  No such drive
  28510.                 nsvErr    No such volume
  28511.                 paramErr  No default volume
  28512.  
  28513. æKY PBFlushVolAsync
  28514. æFc Files.h
  28515. æT Function
  28516. æTN A413
  28517. æD #pragma parameter __D0 PBFlushVolAsync(__A0)
  28518. pascal OSErr PBFlushVolAsync(ParmBlkPtr paramBlock)
  28519.     = 0xA413; 
  28520. æDT #pragma parameter __D0 myVariable = PBFlushVolAsync()(__A0);
  28521. æMM
  28522. æRI II-105, IV-133
  28523. æC 
  28524. Trap macro    _FlushVol
  28525.  
  28526. Parameter block
  28527.   -->    12    ioCompletion  pointer
  28528.   <--    16    ioResult      word
  28529.   -->    18    ioNamePtr     pointer
  28530.   -->    22    ioVRefNum     word
  28531.  
  28532. On the volume specified by ioNamePtr or ioVRefNum, PBFlushVol writes descriptive
  28533. information about the volume, the contents of the associated volume buffer, and all
  28534. access path buffers for the volume (if they’ve changed since the last time PBFlushVol
  28535. was called).
  28536.  
  28537. Note:  The date and time of the last modification to the volume are set
  28538.        when the modification is made, not when the volume is flushed.
  28539.  
  28540. Result codes    noErr     No error
  28541.                 bdNamErr  Bad volume name
  28542.                 extFSErr  External file system
  28543.                 ioErr     I/O error
  28544.                 nsDrvErr  No such drive
  28545.                 nsvErr    No such volume
  28546.                 paramErr  No default volume
  28547.  
  28548. æKY PBCreate
  28549. æFc Files.h
  28550. æT Function
  28551. æD pascal OSErr PBCreate(ParmBlkPtr paramBlock,Boolean async); 
  28552. æDT OSErr myVariable = PBCreate((ParmBlkPtr) paramBlock,(Boolean) async);
  28553. æRI II-107, IV-145
  28554. æC 
  28555. Trap macro    _Create
  28556.  
  28557. Parameter block
  28558.   -->    12    ioCompletion  pointer
  28559.   <--    16    ioResult      word
  28560.   -->    18    ioNamePtr     pointer
  28561.   -->    22    ioVRefNum     word
  28562.   -->    26    ioFVersNum    byte
  28563.  
  28564. PBCreate creates a new file (both forks) having the name pointed to by ioNamePtr (and
  28565. on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  28566. The new file is unlocked and empty. The date and time of its creation and last modification
  28567. are set to the current date and time. If the file created isn’t temporary (that is,
  28568. if it will exist after the application terminates), the application should call
  28569. PBSetFInfo (after PBCreate) to fill in the information needed by the Finder.
  28570.  
  28571. Assembly-language note:  If a desk accessory creates a file, it should
  28572.                          always create it in the directory containing the
  28573.                          system folder. The working directory reference
  28574.                          number for this directory is stored in the global
  28575.                          variable BootDrive; you can pass it in ioVRefNum.
  28576.  
  28577. Result codes    noErr      No error
  28578.                 bdNamErr   Bad file name
  28579.                 dupFNErr   Duplicate file name and version
  28580.                 dirFulErr  File directory full
  28581.                 extFSErr   External file system
  28582.                 ioErr      I/O error
  28583.                 nsvErr     No such volume
  28584.                 vLckdErr   Software volume lock
  28585.                 wPrErr     Hardware volume lock
  28586.  
  28587. æKY PBCreateSync
  28588. æFc Files.h
  28589. æT Function
  28590. æTN A008
  28591. æD #pragma parameter __D0 PBCreateSync(__A0)
  28592. pascal OSErr PBCreateSync(ParmBlkPtr paramBlock)
  28593.     = 0xA008; 
  28594. æDT #pragma parameter __D0 myVariable = PBCreateSync()(__A0);
  28595. æRI II-107, IV-145
  28596. æC 
  28597. Trap macro    _Create
  28598.  
  28599. Parameter block
  28600.   -->    12    ioCompletion  pointer
  28601.   <--    16    ioResult      word
  28602.   -->    18    ioNamePtr     pointer
  28603.   -->    22    ioVRefNum     word
  28604.   -->    26    ioFVersNum    byte
  28605.  
  28606. PBCreate creates a new file (both forks) having the name pointed to by ioNamePtr (and
  28607. on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  28608. The new file is unlocked and empty. The date and time of its creation and last modification
  28609. are set to the current date and time. If the file created isn’t temporary (that is,
  28610. if it will exist after the application terminates), the application should call
  28611. PBSetFInfo (after PBCreate) to fill in the information needed by the Finder.
  28612.  
  28613. Assembly-language note:  If a desk accessory creates a file, it should
  28614.                          always create it in the directory containing the
  28615.                          system folder. The working directory reference
  28616.                          number for this directory is stored in the global
  28617.                          variable BootDrive; you can pass it in ioVRefNum.
  28618.  
  28619. Result codes    noErr      No error
  28620.                 bdNamErr   Bad file name
  28621.                 dupFNErr   Duplicate file name and version
  28622.                 dirFulErr  File directory full
  28623.                 extFSErr   External file system
  28624.                 ioErr      I/O error
  28625.                 nsvErr     No such volume
  28626.                 vLckdErr   Software volume lock
  28627.                 wPrErr     Hardware volume lock
  28628.  
  28629. æKY PBCreateAsync
  28630. æFc Files.h
  28631. æT Function
  28632. æTN A408
  28633. æD #pragma parameter __D0 PBCreateAsync(__A0)
  28634. pascal OSErr PBCreateAsync(ParmBlkPtr paramBlock)
  28635.     = 0xA408; 
  28636. æDT #pragma parameter __D0 myVariable = PBCreateAsync()(__A0);
  28637. æRI II-107, IV-145
  28638. æC 
  28639. Trap macro    _Create
  28640.  
  28641. Parameter block
  28642.   -->    12    ioCompletion  pointer
  28643.   <--    16    ioResult      word
  28644.   -->    18    ioNamePtr     pointer
  28645.   -->    22    ioVRefNum     word
  28646.   -->    26    ioFVersNum    byte
  28647.  
  28648. PBCreate creates a new file (both forks) having the name pointed to by ioNamePtr (and
  28649. on flat volumes, the version number ioVersNum) on the volume specified by ioVRefNum.
  28650. The new file is unlocked and empty. The date and time of its creation and last modification
  28651. are set to the current date and time. If the file created isn’t temporary (that is,
  28652. if it will exist after the application terminates), the application should call
  28653. PBSetFInfo (after PBCreate) to fill in the information needed by the Finder.
  28654.  
  28655. Assembly-language note:  If a desk accessory creates a file, it should
  28656.                          always create it in the directory containing the
  28657.                          system folder. The working directory reference
  28658.                          number for this directory is stored in the global
  28659.                          variable BootDrive; you can pass it in ioVRefNum.
  28660.  
  28661. Result codes    noErr      No error
  28662.                 bdNamErr   Bad file name
  28663.                 dupFNErr   Duplicate file name and version
  28664.                 dirFulErr  File directory full
  28665.                 extFSErr   External file system
  28666.                 ioErr      I/O error
  28667.                 nsvErr     No such volume
  28668.                 vLckdErr   Software volume lock
  28669.                 wPrErr     Hardware volume lock
  28670.  
  28671. æKY PBDelete
  28672. æFc Files.h
  28673. æT Function
  28674. æD pascal OSErr PBDelete(ParmBlkPtr paramBlock,Boolean async); 
  28675. æDT OSErr myVariable = PBDelete((ParmBlkPtr) paramBlock,(Boolean) async);
  28676. æRI II-119, IV-147
  28677. æC 
  28678. Trap macro    _Delete
  28679.  
  28680. Parameter block
  28681.   -->    12    ioCompletion  pointer
  28682.   <--    16    ioResult      word
  28683.   -->    18    ioNamePtr     pointer
  28684.   -->    22    ioVRefNum     word
  28685.   -->    26    ioFVersNum    byte
  28686.  
  28687. PBDelete removes the closed file having the name pointed to by ioNamePtr (and on flat
  28688. volumes, the version number ioVersNum) from the volume pointed to by ioVRefNum.
  28689. PBHDelete can be used to delete an empty directory as well.
  28690.  
  28691. Note:  This function will delete both forks of the file.
  28692.  
  28693. Result codes    noErr     No error
  28694.                 bdNamErr  Bad file name
  28695.                 extFSErr  External file system
  28696.                 fBsyErr   File busy, directory not empty, or working
  28697.                           directory control block open
  28698.                 fLckdErr  File locked
  28699.                 fnfErr    File not found
  28700.                 nsvErr    No such volume
  28701.                 ioErr     I/O error
  28702.                 vLckdErr  Software volume lock
  28703.                 wPrErr    Hardware volume lock
  28704.  
  28705. æKY PBDeleteSync
  28706. æFc Files.h
  28707. æT Function
  28708. æTN A009
  28709. æD #pragma parameter __D0 PBDeleteSync(__A0)
  28710. pascal OSErr PBDeleteSync(ParmBlkPtr paramBlock)
  28711.     = 0xA009; 
  28712. æDT #pragma parameter __D0 myVariable = PBDeleteSync()(__A0);
  28713. æRI II-119, IV-147
  28714. æC 
  28715. Trap macro    _Delete
  28716.  
  28717. Parameter block
  28718.   -->    12    ioCompletion  pointer
  28719.   <--    16    ioResult      word
  28720.   -->    18    ioNamePtr     pointer
  28721.   -->    22    ioVRefNum     word
  28722.   -->    26    ioFVersNum    byte
  28723.  
  28724. PBDelete removes the closed file having the name pointed to by ioNamePtr (and on flat
  28725. volumes, the version number ioVersNum) from the volume pointed to by ioVRefNum.
  28726. PBHDelete can be used to delete an empty directory as well.
  28727.  
  28728. Note:  This function will delete both forks of the file.
  28729.  
  28730. Result codes    noErr     No error
  28731.                 bdNamErr  Bad file name
  28732.                 extFSErr  External file system
  28733.                 fBsyErr   File busy, directory not empty, or working
  28734.                           directory control block open
  28735.                 fLckdErr  File locked
  28736.                 fnfErr    File not found
  28737.                 nsvErr    No such volume
  28738.                 ioErr     I/O error
  28739.                 vLckdErr  Software volume lock
  28740.                 wPrErr    Hardware volume lock
  28741.  
  28742. æKY PBDeleteAsync
  28743. æFc Files.h
  28744. æT Function
  28745. æTN A409
  28746. æD #pragma parameter __D0 PBDeleteAsync(__A0)
  28747. pascal OSErr PBDeleteAsync(ParmBlkPtr paramBlock)
  28748.     = 0xA409; 
  28749. æDT #pragma parameter __D0 myVariable = PBDeleteAsync()(__A0);
  28750. æRI II-119, IV-147
  28751. æC 
  28752. Trap macro    _Delete
  28753.  
  28754. Parameter block
  28755.   -->    12    ioCompletion  pointer
  28756.   <--    16    ioResult      word
  28757.   -->    18    ioNamePtr     pointer
  28758.   -->    22    ioVRefNum     word
  28759.   -->    26    ioFVersNum    byte
  28760.  
  28761. PBDelete removes the closed file having the name pointed to by ioNamePtr (and on flat
  28762. volumes, the version number ioVersNum) from the volume pointed to by ioVRefNum.
  28763. PBHDelete can be used to delete an empty directory as well.
  28764.  
  28765. Note:  This function will delete both forks of the file.
  28766.  
  28767. Result codes    noErr     No error
  28768.                 bdNamErr  Bad file name
  28769.                 extFSErr  External file system
  28770.                 fBsyErr   File busy, directory not empty, or working
  28771.                           directory control block open
  28772.                 fLckdErr  File locked
  28773.                 fnfErr    File not found
  28774.                 nsvErr    No such volume
  28775.                 ioErr     I/O error
  28776.                 vLckdErr  Software volume lock
  28777.                 wPrErr    Hardware volume lock
  28778.  
  28779. æKY PBOpenDF
  28780. æFc Files.h
  28781. æT Function
  28782. æD pascal OSErr PBOpenDF(ParmBlkPtr paramBlock,Boolean async); 
  28783. æDT OSErr myVariable = PBOpenDF((ParmBlkPtr) paramBlock,(Boolean) async);
  28784. æRI PBOpenWD function  IV-158, N77-1
  28785.  
  28786. æC 
  28787.  
  28788. æKY PBOpenDFSync
  28789. æFc Files.h
  28790. æT Function
  28791. æTN 701A,A060
  28792. æD #pragma parameter __D0 PBOpenDFSync(__A0)
  28793. pascal OSErr PBOpenDFSync(ParmBlkPtr paramBlock)
  28794.     = {0x701A,0xA060}; 
  28795. æDT #pragma parameter __D0 myVariable = PBOpenDFSync()(__A0);
  28796. æRI PBOpenWD function  IV-158, N77-1
  28797.  
  28798. æC 
  28799.  
  28800. æKY PBOpenDFAsync
  28801. æFc Files.h
  28802. æT Function
  28803. æTN 701A,A460
  28804. æD #pragma parameter __D0 PBOpenDFAsync(__A0)
  28805. pascal OSErr PBOpenDFAsync(ParmBlkPtr paramBlock)
  28806.     = {0x701A,0xA460}; 
  28807. æDT #pragma parameter __D0 myVariable = PBOpenDFAsync()(__A0);
  28808. æRI PBOpenWD function  IV-158, N77-1
  28809.  
  28810. æC 
  28811.  
  28812. æKY PBOpenRF
  28813. æFc Files.h
  28814. æT Function
  28815. æD pascal OSErr PBOpenRF(ParmBlkPtr paramBlock,Boolean async); 
  28816. æDT OSErr myVariable = PBOpenRF((ParmBlkPtr) paramBlock,(Boolean) async);
  28817. æMM
  28818. æRT 74
  28819. æRI II-109, IV-137 
  28820. æC 
  28821. Trap macro    _OpenRF
  28822.  
  28823. Parameter block
  28824.   -->    12    ioCompletion  pointer
  28825.   <--    16    ioResult      word
  28826.   -->    18    ioNamePtr     pointer
  28827.   -->    22    ioVRefNum     word
  28828.   <--    24    ioRefNum      word
  28829.   -->    26    ioVersNum     byte
  28830.   -->    27    ioPermssn     byte
  28831.   -->    28    ioMisc        pointer
  28832.  
  28833. PBOpenRF is identical to PBOpen, except that it opens the file’s resource fork instead
  28834. of its data fork.
  28835.  
  28836. Note:  Normally you should access a file’s resource fork through the
  28837.        routines of the Resource Manager rather than the File Manager.
  28838.        PBOpenRF doesn’t read the resource map into memory; it’s really
  28839.        only useful for block-level operations such as copying files.
  28840.  
  28841. Result codes    noErr     No error
  28842.                 bdNamErr  Bad file name
  28843.                 extFSErr  External file system
  28844.                 fnfErr    File not found
  28845.                 ioErr     I/O error
  28846.                 nsvErr    No such volume
  28847.                 opWrErr   File already open for writing
  28848.                 permErr   Attempt to open locked file for writing
  28849.                 tmfoErr   Too many files open
  28850.  
  28851. æKY PBOpenRFSync
  28852. æFc Files.h
  28853. æT Function
  28854. æTN A00A
  28855. æD #pragma parameter __D0 PBOpenRFSync(__A0)
  28856. pascal OSErr PBOpenRFSync(ParmBlkPtr paramBlock)
  28857.     = 0xA00A; 
  28858. æDT #pragma parameter __D0 myVariable = PBOpenRFSync()(__A0);
  28859. æMM
  28860. æRT 74
  28861. æRI II-109, IV-137 
  28862. æC 
  28863. Trap macro    _OpenRF
  28864.  
  28865. Parameter block
  28866.   -->    12    ioCompletion  pointer
  28867.   <--    16    ioResult      word
  28868.   -->    18    ioNamePtr     pointer
  28869.   -->    22    ioVRefNum     word
  28870.   <--    24    ioRefNum      word
  28871.   -->    26    ioVersNum     byte
  28872.   -->    27    ioPermssn     byte
  28873.   -->    28    ioMisc        pointer
  28874.  
  28875. PBOpenRF is identical to PBOpen, except that it opens the file’s resource fork instead
  28876. of its data fork.
  28877.  
  28878. Note:  Normally you should access a file’s resource fork through the
  28879.        routines of the Resource Manager rather than the File Manager.
  28880.        PBOpenRF doesn’t read the resource map into memory; it’s really
  28881.        only useful for block-level operations such as copying files.
  28882.  
  28883. Result codes    noErr     No error
  28884.                 bdNamErr  Bad file name
  28885.                 extFSErr  External file system
  28886.                 fnfErr    File not found
  28887.                 ioErr     I/O error
  28888.                 nsvErr    No such volume
  28889.                 opWrErr   File already open for writing
  28890.                 permErr   Attempt to open locked file for writing
  28891.                 tmfoErr   Too many files open
  28892.  
  28893. æKY PBOpenRFAsync
  28894. æFc Files.h
  28895. æT Function
  28896. æTN A40A
  28897. æD #pragma parameter __D0 PBOpenRFAsync(__A0)
  28898. pascal OSErr PBOpenRFAsync(ParmBlkPtr paramBlock)
  28899.     = 0xA40A; 
  28900. æDT #pragma parameter __D0 myVariable = PBOpenRFAsync()(__A0);
  28901. æMM
  28902. æRT 74
  28903. æRI II-109, IV-137 
  28904. æC 
  28905. Trap macro    _OpenRF
  28906.  
  28907. Parameter block
  28908.   -->    12    ioCompletion  pointer
  28909.   <--    16    ioResult      word
  28910.   -->    18    ioNamePtr     pointer
  28911.   -->    22    ioVRefNum     word
  28912.   <--    24    ioRefNum      word
  28913.   -->    26    ioVersNum     byte
  28914.   -->    27    ioPermssn     byte
  28915.   -->    28    ioMisc        pointer
  28916.  
  28917. PBOpenRF is identical to PBOpen, except that it opens the file’s resource fork instead
  28918. of its data fork.
  28919.  
  28920. Note:  Normally you should access a file’s resource fork through the
  28921.        routines of the Resource Manager rather than the File Manager.
  28922.        PBOpenRF doesn’t read the resource map into memory; it’s really
  28923.        only useful for block-level operations such as copying files.
  28924.  
  28925. Result codes    noErr     No error
  28926.                 bdNamErr  Bad file name
  28927.                 extFSErr  External file system
  28928.                 fnfErr    File not found
  28929.                 ioErr     I/O error
  28930.                 nsvErr    No such volume
  28931.                 opWrErr   File already open for writing
  28932.                 permErr   Attempt to open locked file for writing
  28933.                 tmfoErr   Too many files open
  28934.  
  28935. æKY PBRename
  28936. æFc Files.h
  28937. æT Function
  28938. æD pascal OSErr PBRename(ParmBlkPtr paramBlock,Boolean async); 
  28939. æDT OSErr myVariable = PBRename((ParmBlkPtr) paramBlock,(Boolean) async);
  28940. æRI II-118, IV-153
  28941. æC 
  28942. Trap macro    _Rename
  28943.  
  28944. Parameter block
  28945.   -->    12    ioCompletion  pointer
  28946.   <--    16    ioResult      word
  28947.   -->    18    ioNamePtr     pointer
  28948.   -->    22    ioVRefNum     word
  28949.   -->    26    ioVersNum     byte
  28950.   -->    28    ioMisc        pointer
  28951.  
  28952. Given a pointer to a file name in ioNamePtr (and on flat volumes, a version number in
  28953. ioVersNum), PBRename changes the name of the file to the name pointed to by ioMisc.
  28954. (If the name pointed to by ioNamePtr contains one or more colons, so must the name
  28955. pointed to by ioMisc.) Access paths currently in use aren’t affected. Given a pointer
  28956. to a volume name in ioNamePtr or a volume reference number in ioVRefNum, it changes
  28957. the name of the volume to the name pointed to by ioMisc. If a volume to be renamed is
  28958. specified by its volume reference number, ioNamePtr can be NIL.
  28959.  
  28960. Warning:  If a volume to be renamed is specified by its volume name, be
  28961.           sure that it ends with a colon, or Rename will consider it a
  28962.           file name.
  28963.  
  28964. Result codes    noErr      No error
  28965.                 bdNamErr   Bad file name
  28966.                 dirFulErr  File directory full
  28967.                 dupFNErr   Duplicate file name and version
  28968.                 extFSErr   External file system
  28969.                 fLckdErr   File locked
  28970.                 fnfErr     File not found
  28971.                 fsRnErr    Problem during rename
  28972.                 ioErr      I/O error
  28973.                 nsvErr     No such volume
  28974.                 paramErr   No default volume
  28975.                 vLckdErr   Software volume lock
  28976.                 wPrErr     Hardware volume lock
  28977.  
  28978. æKY PBRenameSync
  28979. æFc Files.h
  28980. æT Function
  28981. æTN A00B
  28982. æD #pragma parameter __D0 PBRenameSync(__A0)
  28983. pascal OSErr PBRenameSync(ParmBlkPtr paramBlock)
  28984.     = 0xA00B; 
  28985. æDT #pragma parameter __D0 myVariable = PBRenameSync()(__A0);
  28986. æRI II-118, IV-153
  28987. æC 
  28988. Trap macro    _Rename
  28989.  
  28990. Parameter block
  28991.   -->    12    ioCompletion  pointer
  28992.   <--    16    ioResult      word
  28993.   -->    18    ioNamePtr     pointer
  28994.   -->    22    ioVRefNum     word
  28995.   -->    26    ioVersNum     byte
  28996.   -->    28    ioMisc        pointer
  28997.  
  28998. Given a pointer to a file name in ioNamePtr (and on flat volumes, a version number in
  28999. ioVersNum), PBRename changes the name of the file to the name pointed to by ioMisc.
  29000. (If the name pointed to by ioNamePtr contains one or more colons, so must the name
  29001. pointed to by ioMisc.) Access paths currently in use aren’t affected. Given a pointer
  29002. to a volume name in ioNamePtr or a volume reference number in ioVRefNum, it changes
  29003. the name of the volume to the name pointed to by ioMisc. If a volume to be renamed is
  29004. specified by its volume reference number, ioNamePtr can be NIL.
  29005.  
  29006. Warning:  If a volume to be renamed is specified by its volume name, be
  29007.           sure that it ends with a colon, or Rename will consider it a
  29008.           file name.
  29009.  
  29010. Result codes    noErr      No error
  29011.                 bdNamErr   Bad file name
  29012.                 dirFulErr  File directory full
  29013.                 dupFNErr   Duplicate file name and version
  29014.                 extFSErr   External file system
  29015.                 fLckdErr   File locked
  29016.                 fnfErr     File not found
  29017.                 fsRnErr    Problem during rename
  29018.                 ioErr      I/O error
  29019.                 nsvErr     No such volume
  29020.                 paramErr   No default volume
  29021.                 vLckdErr   Software volume lock
  29022.                 wPrErr     Hardware volume lock
  29023.  
  29024. æKY PBRenameAsync
  29025. æFc Files.h
  29026. æT Function
  29027. æTN A40B
  29028. æD #pragma parameter __D0 PBRenameAsync(__A0)
  29029. pascal OSErr PBRenameAsync(ParmBlkPtr paramBlock)
  29030.     = 0xA40B; 
  29031. æDT #pragma parameter __D0 myVariable = PBRenameAsync()(__A0);
  29032. æRI II-118, IV-153
  29033. æC 
  29034. Trap macro    _Rename
  29035.  
  29036. Parameter block
  29037.   -->    12    ioCompletion  pointer
  29038.   <--    16    ioResult      word
  29039.   -->    18    ioNamePtr     pointer
  29040.   -->    22    ioVRefNum     word
  29041.   -->    26    ioVersNum     byte
  29042.   -->    28    ioMisc        pointer
  29043.  
  29044. Given a pointer to a file name in ioNamePtr (and on flat volumes, a version number in
  29045. ioVersNum), PBRename changes the name of the file to the name pointed to by ioMisc.
  29046. (If the name pointed to by ioNamePtr contains one or more colons, so must the name
  29047. pointed to by ioMisc.) Access paths currently in use aren’t affected. Given a pointer
  29048. to a volume name in ioNamePtr or a volume reference number in ioVRefNum, it changes
  29049. the name of the volume to the name pointed to by ioMisc. If a volume to be renamed is
  29050. specified by its volume reference number, ioNamePtr can be NIL.
  29051.  
  29052. Warning:  If a volume to be renamed is specified by its volume name, be
  29053.           sure that it ends with a colon, or Rename will consider it a
  29054.           file name.
  29055.  
  29056. Result codes    noErr      No error
  29057.                 bdNamErr   Bad file name
  29058.                 dirFulErr  File directory full
  29059.                 dupFNErr   Duplicate file name and version
  29060.                 extFSErr   External file system
  29061.                 fLckdErr   File locked
  29062.                 fnfErr     File not found
  29063.                 fsRnErr    Problem during rename
  29064.                 ioErr      I/O error
  29065.                 nsvErr     No such volume
  29066.                 paramErr   No default volume
  29067.                 vLckdErr   Software volume lock
  29068.                 wPrErr     Hardware volume lock
  29069.  
  29070. æKY PBGetFInfo
  29071. æFc Files.h
  29072. æT Function
  29073. æD pascal OSErr PBGetFInfo(ParmBlkPtr paramBlock,Boolean async); 
  29074. æDT OSErr myVariable = PBGetFInfo((ParmBlkPtr) paramBlock,(Boolean) async);
  29075. æRT 24
  29076. æRI II-115, IV-148, N24-1, N68-1
  29077. æC 
  29078. Trap macro    _GetFileInfo
  29079.  
  29080. Parameter block
  29081.   -->    12    ioCompletion  pointer
  29082.   <--    16    ioResult      word
  29083.   <->    18    ioNamePtr     pointer
  29084.   -->    22    ioVRefNum     word
  29085.   <--    24    ioFRefNum     word
  29086.   -->    26    ioFVersNum    byte
  29087.   -->    28    ioFDirIndex   word
  29088.   <--    30    ioFlAttrib    byte
  29089.   <--    31    ioFlVersNum   byte
  29090.   <--    32    ioFlFndrInfo  16 bytes
  29091.   <--    48    ioFlNum       long word
  29092.   <--    52    ioFlStBlk     word
  29093.   <--    54    ioFlLgLen     long word
  29094.   <--    58    ioFlPyLen     long word
  29095.   <--    62    ioFlRStBlk    word
  29096.   <--    64    ioFlRLgLen    long word
  29097.   <--    68    ioFlRPyLen    long word
  29098.   <--    72    ioFlCrDat     long word
  29099.   <--    76    ioFlMdDat     long word
  29100.  
  29101. PBGetFInfo returns information about the specified file. If ioFDirIndex is positive,
  29102. the File Manager returns information about the file whose directory index is ioFDirIndex
  29103. on the volume specified by ioVRefNum. (See the section
  29104. “Data Organization on Volumes” if you’re interested in using this method.)
  29105.  
  29106. Note:  If a working directory reference number is specified in ioVRefNum,
  29107.        the File Manager returns information about the file whose directory
  29108.        index is ioFDirIndex in the specified directory.
  29109.  
  29110. If ioFDirIndex is negative or 0, the File Manager returns information about the file
  29111. having the name pointed to by ioNamePtr (and on flat volumes, the version number
  29112. ioFVersNum) on the volume specified by ioVRefNum. If the file is open, the reference
  29113. number of the first access path found is returned in ioFRefNum, and the name of the
  29114. file is returned in ioNamePtr (unless ioNamePtr is NIL).
  29115.  
  29116. Result codes    noErr     No error
  29117.                 bdNamErr  Bad file name
  29118.                 extFSErr  External file system
  29119.                 fnfErr    File not found
  29120.                 ioErr     I/O error
  29121.                 nsvErr    No such volume
  29122.                 paramErr  No default volume
  29123.  
  29124. æKY PBGetFInfoSync
  29125. æFc Files.h
  29126. æT Function
  29127. æTN A00C
  29128. æD #pragma parameter __D0 PBGetFInfoSync(__A0)
  29129. pascal OSErr PBGetFInfoSync(ParmBlkPtr paramBlock)
  29130.     = 0xA00C; 
  29131. æDT #pragma parameter __D0 myVariable = PBGetFInfoSync()(__A0);
  29132. æRT 24
  29133. æRI II-115, IV-148, N24-1, N68-1
  29134. æC 
  29135. Trap macro    _GetFileInfo
  29136.  
  29137. Parameter block
  29138.   -->    12    ioCompletion  pointer
  29139.   <--    16    ioResult      word
  29140.   <->    18    ioNamePtr     pointer
  29141.   -->    22    ioVRefNum     word
  29142.   <--    24    ioFRefNum     word
  29143.   -->    26    ioFVersNum    byte
  29144.   -->    28    ioFDirIndex   word
  29145.   <--    30    ioFlAttrib    byte
  29146.   <--    31    ioFlVersNum   byte
  29147.   <--    32    ioFlFndrInfo  16 bytes
  29148.   <--    48    ioFlNum       long word
  29149.   <--    52    ioFlStBlk     word
  29150.   <--    54    ioFlLgLen     long word
  29151.   <--    58    ioFlPyLen     long word
  29152.   <--    62    ioFlRStBlk    word
  29153.   <--    64    ioFlRLgLen    long word
  29154.   <--    68    ioFlRPyLen    long word
  29155.   <--    72    ioFlCrDat     long word
  29156.   <--    76    ioFlMdDat     long word
  29157.  
  29158. PBGetFInfo returns information about the specified file. If ioFDirIndex is positive,
  29159. the File Manager returns information about the file whose directory index is ioFDirIndex
  29160. on the volume specified by ioVRefNum. (See the section
  29161. “Data Organization on Volumes” if you’re interested in using this method.)
  29162.  
  29163. Note:  If a working directory reference number is specified in ioVRefNum,
  29164.        the File Manager returns information about the file whose directory
  29165.        index is ioFDirIndex in the specified directory.
  29166.  
  29167. If ioFDirIndex is negative or 0, the File Manager returns information about the file
  29168. having the name pointed to by ioNamePtr (and on flat volumes, the version number
  29169. ioFVersNum) on the volume specified by ioVRefNum. If the file is open, the reference
  29170. number of the first access path found is returned in ioFRefNum, and the name of the
  29171. file is returned in ioNamePtr (unless ioNamePtr is NIL).
  29172.  
  29173. Result codes    noErr     No error
  29174.                 bdNamErr  Bad file name
  29175.                 extFSErr  External file system
  29176.                 fnfErr    File not found
  29177.                 ioErr     I/O error
  29178.                 nsvErr    No such volume
  29179.                 paramErr  No default volume
  29180.  
  29181. æKY PBGetFInfoAsync
  29182. æFc Files.h
  29183. æT Function
  29184. æTN A40C
  29185. æD #pragma parameter __D0 PBGetFInfoAsync(__A0)
  29186. pascal OSErr PBGetFInfoAsync(ParmBlkPtr paramBlock)
  29187.     = 0xA40C; 
  29188. æDT #pragma parameter __D0 myVariable = PBGetFInfoAsync()(__A0);
  29189. æRT 24
  29190. æRI II-115, IV-148, N24-1, N68-1
  29191. æC 
  29192. Trap macro    _GetFileInfo
  29193.  
  29194. Parameter block
  29195.   -->    12    ioCompletion  pointer
  29196.   <--    16    ioResult      word
  29197.   <->    18    ioNamePtr     pointer
  29198.   -->    22    ioVRefNum     word
  29199.   <--    24    ioFRefNum     word
  29200.   -->    26    ioFVersNum    byte
  29201.   -->    28    ioFDirIndex   word
  29202.   <--    30    ioFlAttrib    byte
  29203.   <--    31    ioFlVersNum   byte
  29204.   <--    32    ioFlFndrInfo  16 bytes
  29205.   <--    48    ioFlNum       long word
  29206.   <--    52    ioFlStBlk     word
  29207.   <--    54    ioFlLgLen     long word
  29208.   <--    58    ioFlPyLen     long word
  29209.   <--    62    ioFlRStBlk    word
  29210.   <--    64    ioFlRLgLen    long word
  29211.   <--    68    ioFlRPyLen    long word
  29212.   <--    72    ioFlCrDat     long word
  29213.   <--    76    ioFlMdDat     long word
  29214.  
  29215. PBGetFInfo returns information about the specified file. If ioFDirIndex is positive,
  29216. the File Manager returns information about the file whose directory index is ioFDirIndex
  29217. on the volume specified by ioVRefNum. (See the section
  29218. “Data Organization on Volumes” if you’re interested in using this method.)
  29219.  
  29220. Note:  If a working directory reference number is specified in ioVRefNum,
  29221.        the File Manager returns information about the file whose directory
  29222.        index is ioFDirIndex in the specified directory.
  29223.  
  29224. If ioFDirIndex is negative or 0, the File Manager returns information about the file
  29225. having the name pointed to by ioNamePtr (and on flat volumes, the version number
  29226. ioFVersNum) on the volume specified by ioVRefNum. If the file is open, the reference
  29227. number of the first access path found is returned in ioFRefNum, and the name of the
  29228. file is returned in ioNamePtr (unless ioNamePtr is NIL).
  29229.  
  29230. Result codes    noErr     No error
  29231.                 bdNamErr  Bad file name
  29232.                 extFSErr  External file system
  29233.                 fnfErr    File not found
  29234.                 ioErr     I/O error
  29235.                 nsvErr    No such volume
  29236.                 paramErr  No default volume
  29237.  
  29238. æKY PBSetFInfo
  29239. æFc Files.h
  29240. æT Function
  29241. æD pascal OSErr PBSetFInfo(ParmBlkPtr paramBlock,Boolean async); 
  29242. æDT OSErr myVariable = PBSetFInfo((ParmBlkPtr) paramBlock,(Boolean) async);
  29243. æRI II-116, IV-150
  29244. æC 
  29245. Trap macro    _SetFileInfo
  29246.  
  29247. Parameter block
  29248.   -->    12    ioCompletion  pointer
  29249.   <--    16    ioResult      word
  29250.   -->    18    ioNamePtr     pointer
  29251.   -->    22    ioVRefNum     word
  29252.   -->    26    ioFVersNum    byte
  29253.   -->    32    ioFlFndrInfo  16 bytes
  29254.   -->    72    ioFlCrDat     long word
  29255.   -->    76    ioFlMdDat     long word
  29256.  
  29257. PBSetFInfo sets information (including the date and time of creation and modification,
  29258. and information needed by the Finder) about the file having the name pointed to by
  29259. ioNamePtr (and on flat volumes, the version number ioFVersNum) on the volume specified
  29260. by ioVRefNum. You should call PBGetFInfo just before PBSetFInfo, so the current
  29261. information is present in the parameter block.
  29262.  
  29263. Result codes    noErr     No error
  29264.                 bdNamErr  Bad file name
  29265.                 extFSErr  External file system
  29266.                 fLckdErr  File locked
  29267.                 fnfErr    File not found
  29268.                 ioErr     I/O error
  29269.                 nsvErr    No such volume
  29270.                 vLckdErr  Software volume lock
  29271.                 wPrErr    Hardware volume lock
  29272.  
  29273. æKY PBSetFInfoSync
  29274. æFc Files.h
  29275. æT Function
  29276. æTN A00D
  29277. æD #pragma parameter __D0 PBSetFInfoSync(__A0)
  29278. pascal OSErr PBSetFInfoSync(ParmBlkPtr paramBlock)
  29279.     = 0xA00D; 
  29280. æDT #pragma parameter __D0 myVariable = PBSetFInfoSync()(__A0);
  29281. æRI II-116, IV-150
  29282. æC 
  29283. Trap macro    _SetFileInfo
  29284.  
  29285. Parameter block
  29286.   -->    12    ioCompletion  pointer
  29287.   <--    16    ioResult      word
  29288.   -->    18    ioNamePtr     pointer
  29289.   -->    22    ioVRefNum     word
  29290.   -->    26    ioFVersNum    byte
  29291.   -->    32    ioFlFndrInfo  16 bytes
  29292.   -->    72    ioFlCrDat     long word
  29293.   -->    76    ioFlMdDat     long word
  29294.  
  29295. PBSetFInfo sets information (including the date and time of creation and modification,
  29296. and information needed by the Finder) about the file having the name pointed to by
  29297. ioNamePtr (and on flat volumes, the version number ioFVersNum) on the volume specified
  29298. by ioVRefNum. You should call PBGetFInfo just before PBSetFInfo, so the current
  29299. information is present in the parameter block.
  29300.  
  29301. Result codes    noErr     No error
  29302.                 bdNamErr  Bad file name
  29303.                 extFSErr  External file system
  29304.                 fLckdErr  File locked
  29305.                 fnfErr    File not found
  29306.                 ioErr     I/O error
  29307.                 nsvErr    No such volume
  29308.                 vLckdErr  Software volume lock
  29309.                 wPrErr    Hardware volume lock
  29310.  
  29311. æKY PBSetFInfoAsync
  29312. æFc Files.h
  29313. æT Function
  29314. æTN A40D
  29315. æD #pragma parameter __D0 PBSetFInfoAsync(__A0)
  29316. pascal OSErr PBSetFInfoAsync(ParmBlkPtr paramBlock)
  29317.     = 0xA40D; 
  29318. æDT #pragma parameter __D0 myVariable = PBSetFInfoAsync()(__A0);
  29319. æRI II-116, IV-150
  29320. æC 
  29321. Trap macro    _SetFileInfo
  29322.  
  29323. Parameter block
  29324.   -->    12    ioCompletion  pointer
  29325.   <--    16    ioResult      word
  29326.   -->    18    ioNamePtr     pointer
  29327.   -->    22    ioVRefNum     word
  29328.   -->    26    ioFVersNum    byte
  29329.   -->    32    ioFlFndrInfo  16 bytes
  29330.   -->    72    ioFlCrDat     long word
  29331.   -->    76    ioFlMdDat     long word
  29332.  
  29333. PBSetFInfo sets information (including the date and time of creation and modification,
  29334. and information needed by the Finder) about the file having the name pointed to by
  29335. ioNamePtr (and on flat volumes, the version number ioFVersNum) on the volume specified
  29336. by ioVRefNum. You should call PBGetFInfo just before PBSetFInfo, so the current
  29337. information is present in the parameter block.
  29338.  
  29339. Result codes    noErr     No error
  29340.                 bdNamErr  Bad file name
  29341.                 extFSErr  External file system
  29342.                 fLckdErr  File locked
  29343.                 fnfErr    File not found
  29344.                 ioErr     I/O error
  29345.                 nsvErr    No such volume
  29346.                 vLckdErr  Software volume lock
  29347.                 wPrErr    Hardware volume lock
  29348.  
  29349. æKY PBSetFLock
  29350. æFc Files.h
  29351. æT Function
  29352. æD pascal OSErr PBSetFLock(ParmBlkPtr paramBlock,Boolean async); 
  29353. æDT OSErr myVariable = PBSetFLock((ParmBlkPtr) paramBlock,(Boolean) async);
  29354. æRI II-116, IV-151
  29355. æC 
  29356. Trap macro    _SetFilLock
  29357.  
  29358. Parameter block
  29359.   -->    12    ioCompletion  pointer
  29360.   <--    16    ioResult      word
  29361.   -->    18    ioNamePtr     pointer
  29362.   -->    22    ioVRefNum     word
  29363.   -->    26    ioFVersNum    byte
  29364.  
  29365. PBSetFLock locks the file having the name pointed to by ioNamePtr (and on flat volumes,
  29366. the version number ioFVersNum) on the volume specified by ioVRefNum. Access paths
  29367. currently in use aren’t affected.
  29368.  
  29369. Result codes    noErr     No error
  29370.                 extFSErr  External file system
  29371.                 fnfErr    File not found
  29372.                 ioErr     I/O error
  29373.                 nsvErr    No such volume
  29374.                 vLckdErr  Software volume lock
  29375.                 wPrErr    Hardware volume lock
  29376.  
  29377. æKY PBSetFLockSync
  29378. æFc Files.h
  29379. æT Function
  29380. æTN A041
  29381. æD #pragma parameter __D0 PBSetFLockSync(__A0)
  29382. pascal OSErr PBSetFLockSync(ParmBlkPtr paramBlock)
  29383.     = 0xA041; 
  29384. æDT #pragma parameter __D0 myVariable = PBSetFLockSync()(__A0);
  29385. æRI II-116, IV-151
  29386. æC 
  29387. Trap macro    _SetFilLock
  29388.  
  29389. Parameter block
  29390.   -->    12    ioCompletion  pointer
  29391.   <--    16    ioResult      word
  29392.   -->    18    ioNamePtr     pointer
  29393.   -->    22    ioVRefNum     word
  29394.   -->    26    ioFVersNum    byte
  29395.  
  29396. PBSetFLock locks the file having the name pointed to by ioNamePtr (and on flat volumes,
  29397. the version number ioFVersNum) on the volume specified by ioVRefNum. Access paths
  29398. currently in use aren’t affected.
  29399.  
  29400. Result codes    noErr     No error
  29401.                 extFSErr  External file system
  29402.                 fnfErr    File not found
  29403.                 ioErr     I/O error
  29404.                 nsvErr    No such volume
  29405.                 vLckdErr  Software volume lock
  29406.                 wPrErr    Hardware volume lock
  29407.  
  29408. æKY PBSetFLockAsync
  29409. æFc Files.h
  29410. æT Function
  29411. æTN A441
  29412. æD #pragma parameter __D0 PBSetFLockAsync(__A0)
  29413. pascal OSErr PBSetFLockAsync(ParmBlkPtr paramBlock)
  29414.     = 0xA441; 
  29415. æDT #pragma parameter __D0 myVariable = PBSetFLockAsync()(__A0);
  29416. æRI II-116, IV-151
  29417. æC 
  29418. Trap macro    _SetFilLock
  29419.  
  29420. Parameter block
  29421.   -->    12    ioCompletion  pointer
  29422.   <--    16    ioResult      word
  29423.   -->    18    ioNamePtr     pointer
  29424.   -->    22    ioVRefNum     word
  29425.   -->    26    ioFVersNum    byte
  29426.  
  29427. PBSetFLock locks the file having the name pointed to by ioNamePtr (and on flat volumes,
  29428. the version number ioFVersNum) on the volume specified by ioVRefNum. Access paths
  29429. currently in use aren’t affected.
  29430.  
  29431. Result codes    noErr     No error
  29432.                 extFSErr  External file system
  29433.                 fnfErr    File not found
  29434.                 ioErr     I/O error
  29435.                 nsvErr    No such volume
  29436.                 vLckdErr  Software volume lock
  29437.                 wPrErr    Hardware volume lock
  29438.  
  29439. æKY PBRstFLock
  29440. æFc Files.h
  29441. æT Function
  29442. æD pascal OSErr PBRstFLock(ParmBlkPtr paramBlock,Boolean async); 
  29443. æDT OSErr myVariable = PBRstFLock((ParmBlkPtr) paramBlock,(Boolean) async);
  29444. æRI II-117, IV-152
  29445. æC 
  29446. Trap macro    _RstFilLock
  29447.  
  29448. Parameter block
  29449.   -->    12    ioCompletion  pointer
  29450.   <--    16    ioResult      word
  29451.   -->    18    ioNamePtr     pointer
  29452.   -->    22    ioVRefNum     word
  29453.   -->    26    ioFVersNum    byte
  29454.  
  29455. PBRstFLock unlocks the file having the name pointed to by ioNamePtr (and on flat
  29456. volumes, the version number ioFVersNum) on the volume specified by ioVRefNum. Access
  29457. paths currently in use aren’t affected.
  29458.  
  29459. Result codes    noErr     No error
  29460.                 extFSErr  External file system
  29461.                 fnfErr    File not found
  29462.                 ioErr     I/O error
  29463.                 nsvErr    No such volume
  29464.                 vLckdErr  Software volume lock
  29465.                 wPrErr    Hardware volume lock
  29466.  
  29467. æKY PBRstFLockSync
  29468. æFc Files.h
  29469. æT Function
  29470. æTN A042
  29471. æD #pragma parameter __D0 PBRstFLockSync(__A0)
  29472. pascal OSErr PBRstFLockSync(ParmBlkPtr paramBlock)
  29473.     = 0xA042; 
  29474. æDT #pragma parameter __D0 myVariable = PBRstFLockSync()(__A0);
  29475. æRI II-117, IV-152
  29476. æC 
  29477. Trap macro    _RstFilLock
  29478.  
  29479. Parameter block
  29480.   -->    12    ioCompletion  pointer
  29481.   <--    16    ioResult      word
  29482.   -->    18    ioNamePtr     pointer
  29483.   -->    22    ioVRefNum     word
  29484.   -->    26    ioFVersNum    byte
  29485.  
  29486. PBRstFLock unlocks the file having the name pointed to by ioNamePtr (and on flat
  29487. volumes, the version number ioFVersNum) on the volume specified by ioVRefNum. Access
  29488. paths currently in use aren’t affected.
  29489.  
  29490. Result codes    noErr     No error
  29491.                 extFSErr  External file system
  29492.                 fnfErr    File not found
  29493.                 ioErr     I/O error
  29494.                 nsvErr    No such volume
  29495.                 vLckdErr  Software volume lock
  29496.                 wPrErr    Hardware volume lock
  29497.  
  29498. æKY PBRstFLockAsync
  29499. æFc Files.h
  29500. æT Function
  29501. æTN A442
  29502. æD #pragma parameter __D0 PBRstFLockAsync(__A0)
  29503. pascal OSErr PBRstFLockAsync(ParmBlkPtr paramBlock)
  29504.     = 0xA442; 
  29505. æDT #pragma parameter __D0 myVariable = PBRstFLockAsync()(__A0);
  29506. æRI II-117, IV-152
  29507. æC 
  29508. Trap macro    _RstFilLock
  29509.  
  29510. Parameter block
  29511.   -->    12    ioCompletion  pointer
  29512.   <--    16    ioResult      word
  29513.   -->    18    ioNamePtr     pointer
  29514.   -->    22    ioVRefNum     word
  29515.   -->    26    ioFVersNum    byte
  29516.  
  29517. PBRstFLock unlocks the file having the name pointed to by ioNamePtr (and on flat
  29518. volumes, the version number ioFVersNum) on the volume specified by ioVRefNum. Access
  29519. paths currently in use aren’t affected.
  29520.  
  29521. Result codes    noErr     No error
  29522.                 extFSErr  External file system
  29523.                 fnfErr    File not found
  29524.                 ioErr     I/O error
  29525.                 nsvErr    No such volume
  29526.                 vLckdErr  Software volume lock
  29527.                 wPrErr    Hardware volume lock
  29528.  
  29529. æKY PBSetFVers
  29530. æFc Files.h
  29531. æT Function
  29532. æD pascal OSErr PBSetFVers(ParmBlkPtr paramBlock,Boolean async); 
  29533. æDT OSErr myVariable = PBSetFVers((ParmBlkPtr) paramBlock,(Boolean) async);
  29534. æRI II-117, IV-153
  29535. æC 
  29536. Trap macro    _SetFilType
  29537.  
  29538. Parameter block
  29539.   -->    12    ioCompletion  pointer
  29540.   <--    16    ioResult      word
  29541.   -->    18    ioNamePtr     pointer
  29542.   -->    22    ioVRefNum     word
  29543.   -->    26    ioVersNum     byte
  29544.   -->    28    ioMisc        byte
  29545.  
  29546. PBSetFVers has no effect on hierarchical volumes. On flat volumes, PBSetFVers changes
  29547. the version number of the file having the name pointed to by ioNamePtr and version
  29548. number ioVersNum, on the volume specified by ioVRefNum, to the version number stored
  29549. in the high-order byte of ioMisc. Access paths currently in use aren’t affected.
  29550.  
  29551. Result codes    noErr         No error
  29552.                 bdNamErr      Bad file name
  29553.                 dupFNErr      Duplicate file name and version
  29554.                 extFSErr      External file system
  29555.                 fLckdErr      File locked
  29556.                 fnfErr        File not found
  29557.                 nsvErr        No such volume
  29558.                 ioErr         I/O error
  29559.                 paramErr      No default volume
  29560.                 vLckdErr      Software volume lock
  29561.                 wPrErr        Hardware volume lock
  29562.                 wrgVolTypErr  Attempt to perform hierarchical operation
  29563.                               on a flat volume
  29564.  
  29565. æKY PBSetFVersSync
  29566. æFc Files.h
  29567. æT Function
  29568. æTN A043
  29569. æD #pragma parameter __D0 PBSetFVersSync(__A0)
  29570. pascal OSErr PBSetFVersSync(ParmBlkPtr paramBlock)
  29571.     = 0xA043; 
  29572. æDT #pragma parameter __D0 myVariable = PBSetFVersSync()(__A0);
  29573. æRI II-117, IV-153
  29574. æC 
  29575. Trap macro    _SetFilType
  29576.  
  29577. Parameter block
  29578.   -->    12    ioCompletion  pointer
  29579.   <--    16    ioResult      word
  29580.   -->    18    ioNamePtr     pointer
  29581.   -->    22    ioVRefNum     word
  29582.   -->    26    ioVersNum     byte
  29583.   -->    28    ioMisc        byte
  29584.  
  29585. PBSetFVers has no effect on hierarchical volumes. On flat volumes, PBSetFVers changes
  29586. the version number of the file having the name pointed to by ioNamePtr and version
  29587. number ioVersNum, on the volume specified by ioVRefNum, to the version number stored
  29588. in the high-order byte of ioMisc. Access paths currently in use aren’t affected.
  29589.  
  29590. Result codes    noErr         No error
  29591.                 bdNamErr      Bad file name
  29592.                 dupFNErr      Duplicate file name and version
  29593.                 extFSErr      External file system
  29594.                 fLckdErr      File locked
  29595.                 fnfErr        File not found
  29596.                 nsvErr        No such volume
  29597.                 ioErr         I/O error
  29598.                 paramErr      No default volume
  29599.                 vLckdErr      Software volume lock
  29600.                 wPrErr        Hardware volume lock
  29601.                 wrgVolTypErr  Attempt to perform hierarchical operation
  29602.                               on a flat volume
  29603.  
  29604. æKY PBSetFVersAsync
  29605. æFc Files.h
  29606. æT Function
  29607. æTN A443
  29608. æD #pragma parameter __D0 PBSetFVersAsync(__A0)
  29609. pascal OSErr PBSetFVersAsync(ParmBlkPtr paramBlock)
  29610.     = 0xA443; 
  29611. æDT #pragma parameter __D0 myVariable = PBSetFVersAsync()(__A0);
  29612. æRI II-117, IV-153
  29613. æC 
  29614. Trap macro    _SetFilType
  29615.  
  29616. Parameter block
  29617.   -->    12    ioCompletion  pointer
  29618.   <--    16    ioResult      word
  29619.   -->    18    ioNamePtr     pointer
  29620.   -->    22    ioVRefNum     word
  29621.   -->    26    ioVersNum     byte
  29622.   -->    28    ioMisc        byte
  29623.  
  29624. PBSetFVers has no effect on hierarchical volumes. On flat volumes, PBSetFVers changes
  29625. the version number of the file having the name pointed to by ioNamePtr and version
  29626. number ioVersNum, on the volume specified by ioVRefNum, to the version number stored
  29627. in the high-order byte of ioMisc. Access paths currently in use aren’t affected.
  29628.  
  29629. Result codes    noErr         No error
  29630.                 bdNamErr      Bad file name
  29631.                 dupFNErr      Duplicate file name and version
  29632.                 extFSErr      External file system
  29633.                 fLckdErr      File locked
  29634.                 fnfErr        File not found
  29635.                 nsvErr        No such volume
  29636.                 ioErr         I/O error
  29637.                 paramErr      No default volume
  29638.                 vLckdErr      Software volume lock
  29639.                 wPrErr        Hardware volume lock
  29640.                 wrgVolTypErr  Attempt to perform hierarchical operation
  29641.                               on a flat volume
  29642.  
  29643. æKY PBAllocate
  29644. æFc Files.h
  29645. æT Function
  29646. æD pascal OSErr PBAllocate(ParmBlkPtr paramBlock,Boolean async); 
  29647. æDT OSErr myVariable = PBAllocate((ParmBlkPtr) paramBlock,(Boolean) async);
  29648. æRI II-113, IV-143
  29649. æC 
  29650. Trap macro    _Allocate
  29651.  
  29652. Parameter block
  29653.   -->    12    ioCompletion  pointer
  29654.   <--    16    ioResult      word
  29655.   -->    24    ioRefNum      word
  29656.   -->    36    ioReqCount    long word
  29657.   <--    40    ioActCount    long word
  29658.  
  29659. PBAllocate adds ioReqCount bytes to the open file whose access path is specified by
  29660. ioRefNum, and sets the physical end-of-file to one byte beyond the last block allocated.
  29661. The number of bytes actually allocated is rounded up to the nearest multiple of the
  29662. allocation block size, and returned in ioActCount. If there isn’t enough empty space
  29663. on the volume to satisfy the allocation request, PBAllocate allocates the rest of the
  29664. space on the volume and returns dskFulErr as its function result.
  29665.  
  29666. Note:  Even if the total number of requested bytes is unavailable,
  29667.        PBAllocate will allocate whatever space, contiguous or not, is
  29668.        available. To force the allocation of the entire requested space
  29669.        as a contiguous piece, call PBAllocContig instead.
  29670.  
  29671. Result codes    noErr      No error
  29672.                 dskFulErr  Disk full
  29673.                 fLckdErr   File locked
  29674.                 fnOpnErr   File not open
  29675.                 ioErr      I/O error
  29676.                 rfNumErr   Bad reference number
  29677.                 vLckdErr   Software volume lock
  29678.                 wPrErr     Hardware volume lock
  29679.                 wrPermErr  Read/write permission doesn’t allow writing
  29680.     wrPermErr   Read/write permission doesn’t allow writing
  29681.  
  29682. æKY PBAllocateSync
  29683. æFc Files.h
  29684. æT Function
  29685. æTN A010
  29686. æD #pragma parameter __D0 PBAllocateSync(__A0)
  29687. pascal OSErr PBAllocateSync(ParmBlkPtr paramBlock)
  29688.     = 0xA010; 
  29689. æDT #pragma parameter __D0 myVariable = PBAllocateSync()(__A0);
  29690. æRI II-113, IV-143
  29691. æC 
  29692. Trap macro    _Allocate
  29693.  
  29694. Parameter block
  29695.   -->    12    ioCompletion  pointer
  29696.   <--    16    ioResult      word
  29697.   -->    24    ioRefNum      word
  29698.   -->    36    ioReqCount    long word
  29699.   <--    40    ioActCount    long word
  29700.  
  29701. PBAllocate adds ioReqCount bytes to the open file whose access path is specified by
  29702. ioRefNum, and sets the physical end-of-file to one byte beyond the last block allocated.
  29703. The number of bytes actually allocated is rounded up to the nearest multiple of the
  29704. allocation block size, and returned in ioActCount. If there isn’t enough empty space
  29705. on the volume to satisfy the allocation request, PBAllocate allocates the rest of the
  29706. space on the volume and returns dskFulErr as its function result.
  29707.  
  29708. Note:  Even if the total number of requested bytes is unavailable,
  29709.        PBAllocate will allocate whatever space, contiguous or not, is
  29710.        available. To force the allocation of the entire requested space
  29711.        as a contiguous piece, call PBAllocContig instead.
  29712.  
  29713. Result codes    noErr      No error
  29714.                 dskFulErr  Disk full
  29715.                 fLckdErr   File locked
  29716.                 fnOpnErr   File not open
  29717.                 ioErr      I/O error
  29718.                 rfNumErr   Bad reference number
  29719.                 vLckdErr   Software volume lock
  29720.                 wPrErr     Hardware volume lock
  29721.                 wrPermErr  Read/write permission doesn’t allow writing
  29722.     wrPermErr   Read/write permission doesn’t allow writing
  29723.  
  29724. æKY PBAllocateAsync
  29725. æFc Files.h
  29726. æT Function
  29727. æTN A410
  29728. æD #pragma parameter __D0 PBAllocateAsync(__A0)
  29729. pascal OSErr PBAllocateAsync(ParmBlkPtr paramBlock)
  29730.     = 0xA410; 
  29731. æDT #pragma parameter __D0 myVariable = PBAllocateAsync()(__A0);
  29732. æRI II-113, IV-143
  29733. æC 
  29734. Trap macro    _Allocate
  29735.  
  29736. Parameter block
  29737.   -->    12    ioCompletion  pointer
  29738.   <--    16    ioResult      word
  29739.   -->    24    ioRefNum      word
  29740.   -->    36    ioReqCount    long word
  29741.   <--    40    ioActCount    long word
  29742.  
  29743. PBAllocate adds ioReqCount bytes to the open file whose access path is specified by
  29744. ioRefNum, and sets the physical end-of-file to one byte beyond the last block allocated.
  29745. The number of bytes actually allocated is rounded up to the nearest multiple of the
  29746. allocation block size, and returned in ioActCount. If there isn’t enough empty space
  29747. on the volume to satisfy the allocation request, PBAllocate allocates the rest of the
  29748. space on the volume and returns dskFulErr as its function result.
  29749.  
  29750. Note:  Even if the total number of requested bytes is unavailable,
  29751.        PBAllocate will allocate whatever space, contiguous or not, is
  29752.        available. To force the allocation of the entire requested space
  29753.        as a contiguous piece, call PBAllocContig instead.
  29754.  
  29755. Result codes    noErr      No error
  29756.                 dskFulErr  Disk full
  29757.                 fLckdErr   File locked
  29758.                 fnOpnErr   File not open
  29759.                 ioErr      I/O error
  29760.                 rfNumErr   Bad reference number
  29761.                 vLckdErr   Software volume lock
  29762.                 wPrErr     Hardware volume lock
  29763.                 wrPermErr  Read/write permission doesn’t allow writing
  29764.     wrPermErr   Read/write permission doesn’t allow writing
  29765.  
  29766. æKY PBGetEOF
  29767. æFc Files.h
  29768. æT Function
  29769. æD pascal OSErr PBGetEOF(ParmBlkPtr paramBlock,Boolean async); 
  29770. æDT OSErr myVariable = PBGetEOF((ParmBlkPtr) paramBlock,(Boolean) async);
  29771. æRI II-112, IV-142
  29772. æC 
  29773. Trap macro    _GetEOF
  29774.  
  29775. Parameter block
  29776.   -->    12    ioCompletion  pointer
  29777.   <--    16    ioResult      word
  29778.   -->    24    ioRefNum      word
  29779.   <--    28    ioMisc        long word
  29780.  
  29781. PBGetEOF returns, in ioMisc, the logical end-of-file of the open file whose access
  29782. path is specified by ioRefNum.
  29783.  
  29784. Result codes    noErr     No error
  29785.                 extFSErr  External file system
  29786.                 fnOpnErr  File not open
  29787.                 ioErr     I/O error
  29788.                 rfNumErr  Bad reference number
  29789.  
  29790. æKY PBGetEOFSync
  29791. æFc Files.h
  29792. æT Function
  29793. æTN A011
  29794. æD #pragma parameter __D0 PBGetEOFSync(__A0)
  29795. pascal OSErr PBGetEOFSync(ParmBlkPtr paramBlock)
  29796.     = 0xA011; 
  29797. æDT #pragma parameter __D0 myVariable = PBGetEOFSync()(__A0);
  29798. æRI II-112, IV-142
  29799. æC 
  29800. Trap macro    _GetEOF
  29801.  
  29802. Parameter block
  29803.   -->    12    ioCompletion  pointer
  29804.   <--    16    ioResult      word
  29805.   -->    24    ioRefNum      word
  29806.   <--    28    ioMisc        long word
  29807.  
  29808. PBGetEOF returns, in ioMisc, the logical end-of-file of the open file whose access
  29809. path is specified by ioRefNum.
  29810.  
  29811. Result codes    noErr     No error
  29812.                 extFSErr  External file system
  29813.                 fnOpnErr  File not open
  29814.                 ioErr     I/O error
  29815.                 rfNumErr  Bad reference number
  29816.  
  29817. æKY PBGetEOFAsync
  29818. æFc Files.h
  29819. æT Function
  29820. æTN A411
  29821. æD #pragma parameter __D0 PBGetEOFAsync(__A0)
  29822. pascal OSErr PBGetEOFAsync(ParmBlkPtr paramBlock)
  29823.     = 0xA411; 
  29824. æDT #pragma parameter __D0 myVariable = PBGetEOFAsync()(__A0);
  29825. æRI II-112, IV-142
  29826. æC 
  29827. Trap macro    _GetEOF
  29828.  
  29829. Parameter block
  29830.   -->    12    ioCompletion  pointer
  29831.   <--    16    ioResult      word
  29832.   -->    24    ioRefNum      word
  29833.   <--    28    ioMisc        long word
  29834.  
  29835. PBGetEOF returns, in ioMisc, the logical end-of-file of the open file whose access
  29836. path is specified by ioRefNum.
  29837.  
  29838. Result codes    noErr     No error
  29839.                 extFSErr  External file system
  29840.                 fnOpnErr  File not open
  29841.                 ioErr     I/O error
  29842.                 rfNumErr  Bad reference number
  29843.  
  29844. æKY PBSetEOF
  29845. æFc Files.h
  29846. æT Function
  29847. æD pascal OSErr PBSetEOF(ParmBlkPtr paramBlock,Boolean async); 
  29848. æDT OSErr myVariable = PBSetEOF((ParmBlkPtr) paramBlock,(Boolean) async);
  29849. æRI II-112, IV-142
  29850. æC 
  29851. Trap macro    _SetEOF
  29852.  
  29853. Parameter block
  29854.   -->    12    ioCompletion  pointer
  29855.   <--    16    ioResult      word
  29856.   -->    24    ioRefNum      word
  29857.   -->    28    ioMisc        long word
  29858.  
  29859. PBSetEOF sets the logical end-of-file of the open file, whose access path is specified
  29860. by ioRefNum, to ioMisc. If you attempt to set the logical end-of-file beyond the
  29861. physical end-of-file, another allocation block is added to the file; if there isn’t
  29862. enough space on the volume, no change is made, and PBSetEOF returns dskFulErr as its
  29863. function result. If ioMisc is 0, all space occupied by the file on the volume is
  29864. released.
  29865.  
  29866. Result codes    noErr      No error
  29867.                 dskFulErr  Disk full
  29868.                 extFSErr   External file system
  29869.                 fLckdErr   File locked
  29870.                 fnOpnErr   File not open
  29871.                 ioErr      I/O error
  29872.                 rfNumErr   Bad reference number
  29873.                 vLckdErr   Software volume lock
  29874.                 wPrErr     Hardware volume lock
  29875.                 wrPermErr  Read/write permission doesn’t allow writing
  29876.  
  29877. æKY PBSetEOFSync
  29878. æFc Files.h
  29879. æT Function
  29880. æTN A012
  29881. æD #pragma parameter __D0 PBSetEOFSync(__A0)
  29882. pascal OSErr PBSetEOFSync(ParmBlkPtr paramBlock)
  29883.     = 0xA012; 
  29884. æDT #pragma parameter __D0 myVariable = PBSetEOFSync()(__A0);
  29885. æRI II-112, IV-142
  29886. æC 
  29887. Trap macro    _SetEOF
  29888.  
  29889. Parameter block
  29890.   -->    12    ioCompletion  pointer
  29891.   <--    16    ioResult      word
  29892.   -->    24    ioRefNum      word
  29893.   -->    28    ioMisc        long word
  29894.  
  29895. PBSetEOF sets the logical end-of-file of the open file, whose access path is specified
  29896. by ioRefNum, to ioMisc. If you attempt to set the logical end-of-file beyond the
  29897. physical end-of-file, another allocation block is added to the file; if there isn’t
  29898. enough space on the volume, no change is made, and PBSetEOF returns dskFulErr as its
  29899. function result. If ioMisc is 0, all space occupied by the file on the volume is
  29900. released.
  29901.  
  29902. Result codes    noErr      No error
  29903.                 dskFulErr  Disk full
  29904.                 extFSErr   External file system
  29905.                 fLckdErr   File locked
  29906.                 fnOpnErr   File not open
  29907.                 ioErr      I/O error
  29908.                 rfNumErr   Bad reference number
  29909.                 vLckdErr   Software volume lock
  29910.                 wPrErr     Hardware volume lock
  29911.                 wrPermErr  Read/write permission doesn’t allow writing
  29912.  
  29913. æKY PBSetEOFAsync
  29914. æFc Files.h
  29915. æT Function
  29916. æTN A412
  29917. æD #pragma parameter __D0 PBSetEOFAsync(__A0)
  29918. pascal OSErr PBSetEOFAsync(ParmBlkPtr paramBlock)
  29919.     = 0xA412; 
  29920. æDT #pragma parameter __D0 myVariable = PBSetEOFAsync()(__A0);
  29921. æRI II-112, IV-142
  29922. æC 
  29923. Trap macro    _SetEOF
  29924.  
  29925. Parameter block
  29926.   -->    12    ioCompletion  pointer
  29927.   <--    16    ioResult      word
  29928.   -->    24    ioRefNum      word
  29929.   -->    28    ioMisc        long word
  29930.  
  29931. PBSetEOF sets the logical end-of-file of the open file, whose access path is specified
  29932. by ioRefNum, to ioMisc. If you attempt to set the logical end-of-file beyond the
  29933. physical end-of-file, another allocation block is added to the file; if there isn’t
  29934. enough space on the volume, no change is made, and PBSetEOF returns dskFulErr as its
  29935. function result. If ioMisc is 0, all space occupied by the file on the volume is
  29936. released.
  29937.  
  29938. Result codes    noErr      No error
  29939.                 dskFulErr  Disk full
  29940.                 extFSErr   External file system
  29941.                 fLckdErr   File locked
  29942.                 fnOpnErr   File not open
  29943.                 ioErr      I/O error
  29944.                 rfNumErr   Bad reference number
  29945.                 vLckdErr   Software volume lock
  29946.                 wPrErr     Hardware volume lock
  29947.                 wrPermErr  Read/write permission doesn’t allow writing
  29948.  
  29949. æKY PBGetFPos
  29950. æFc Files.h
  29951. æT Function
  29952. æD pascal OSErr PBGetFPos(ParmBlkPtr paramBlock,Boolean async); 
  29953. æDT OSErr myVariable = PBGetFPos((ParmBlkPtr) paramBlock,(Boolean) async);
  29954. æRI II-111, IV-141
  29955. æC 
  29956. Trap macro    _GetFPos
  29957.  
  29958. Parameter block
  29959.   -->    12    ioCompletion  pointer
  29960.   <--    16    ioResult      word
  29961.   -->    24    ioRefNum      word
  29962.   <--    36    ioReqCount    long word
  29963.   <--    40    ioActCount    long word
  29964.   <--    44    ioPosMode     word
  29965.   <--    46    ioPosOffset   long word
  29966.  
  29967. PBGetFPos returns, in ioPosOffset, the mark of the open file whose access path is
  29968. specified by ioRefNum. It sets ioReqCount, ioActCount, and ioPosMode to 0.
  29969.  
  29970. Result codes    noErr     No error
  29971.                 extFSErr  External file system
  29972.                 fnOpnErr  File not open
  29973.                 gfpErr    Error during GetFPos
  29974.                 ioErr     I/O error
  29975.                 rfNumErr  Bad reference number
  29976.  
  29977. æKY PBGetFPosSync
  29978. æFc Files.h
  29979. æT Function
  29980. æTN A018
  29981. æD #pragma parameter __D0 PBGetFPosSync(__A0)
  29982. pascal OSErr PBGetFPosSync(ParmBlkPtr paramBlock)
  29983.     = 0xA018; 
  29984. æDT #pragma parameter __D0 myVariable = PBGetFPosSync()(__A0);
  29985. æRI II-111, IV-141
  29986. æC 
  29987. Trap macro    _GetFPos
  29988.  
  29989. Parameter block
  29990.   -->    12    ioCompletion  pointer
  29991.   <--    16    ioResult      word
  29992.   -->    24    ioRefNum      word
  29993.   <--    36    ioReqCount    long word
  29994.   <--    40    ioActCount    long word
  29995.   <--    44    ioPosMode     word
  29996.   <--    46    ioPosOffset   long word
  29997.  
  29998. PBGetFPos returns, in ioPosOffset, the mark of the open file whose access path is
  29999. specified by ioRefNum. It sets ioReqCount, ioActCount, and ioPosMode to 0.
  30000.  
  30001. Result codes    noErr     No error
  30002.                 extFSErr  External file system
  30003.                 fnOpnErr  File not open
  30004.                 gfpErr    Error during GetFPos
  30005.                 ioErr     I/O error
  30006.                 rfNumErr  Bad reference number
  30007.  
  30008. æKY PBGetFPosAsync
  30009. æFc Files.h
  30010. æT Function
  30011. æTN A418
  30012. æD #pragma parameter __D0 PBGetFPosAsync(__A0)
  30013. pascal OSErr PBGetFPosAsync(ParmBlkPtr paramBlock)
  30014.     = 0xA418; 
  30015. æDT #pragma parameter __D0 myVariable = PBGetFPosAsync()(__A0);
  30016. æRI II-111, IV-141
  30017. æC 
  30018. Trap macro    _GetFPos
  30019.  
  30020. Parameter block
  30021.   -->    12    ioCompletion  pointer
  30022.   <--    16    ioResult      word
  30023.   -->    24    ioRefNum      word
  30024.   <--    36    ioReqCount    long word
  30025.   <--    40    ioActCount    long word
  30026.   <--    44    ioPosMode     word
  30027.   <--    46    ioPosOffset   long word
  30028.  
  30029. PBGetFPos returns, in ioPosOffset, the mark of the open file whose access path is
  30030. specified by ioRefNum. It sets ioReqCount, ioActCount, and ioPosMode to 0.
  30031.  
  30032. Result codes    noErr     No error
  30033.                 extFSErr  External file system
  30034.                 fnOpnErr  File not open
  30035.                 gfpErr    Error during GetFPos
  30036.                 ioErr     I/O error
  30037.                 rfNumErr  Bad reference number
  30038.  
  30039. æKY PBSetFPos
  30040. æFc Files.h
  30041. æT Function
  30042. æD pascal OSErr PBSetFPos(ParmBlkPtr paramBlock,Boolean async); 
  30043. æDT OSErr myVariable = PBSetFPos((ParmBlkPtr) paramBlock,(Boolean) async);
  30044. æRI II-111, IV-141
  30045. æC 
  30046. Trap macro    _SetFPos
  30047.  
  30048. Parameter block
  30049.   -->    12    ioCompletion  pointer
  30050.   <--    16    ioResult      word
  30051.   -->    24    ioRefNum      word
  30052.   -->    44    ioPosMode     word
  30053.   <->    46    ioPosOffset   long word
  30054.  
  30055. PBSetFPos sets the mark of the open file whose access path is specified by ioRefNum
  30056. to the position specified by ioPosMode and ioPosOffset. The position at which the
  30057. mark is actually set is returned in ioPosOffset. If you try to set the mark past the
  30058. logical end-of-file, PBSetFPos moves the mark to the end-of-file and returns eofErr
  30059. as its function result.
  30060.  
  30061. Result codes    noErr     No error
  30062.                 eofErr    End-of-file
  30063.                 extFSErr  External file system
  30064.                 fnOpnErr  File not open
  30065.                 ioErr     I/O error
  30066.                 posErr    Attempt to position before start of file
  30067.                 rfNumErr  Bad reference number
  30068.  
  30069. æKY PBSetFPosSync
  30070. æFc Files.h
  30071. æT Function
  30072. æTN A044
  30073. æD #pragma parameter __D0 PBSetFPosSync(__A0)
  30074. pascal OSErr PBSetFPosSync(ParmBlkPtr paramBlock)
  30075.     = 0xA044; 
  30076. æDT #pragma parameter __D0 myVariable = PBSetFPosSync()(__A0);
  30077. æRI II-111, IV-141
  30078. æC 
  30079. Trap macro    _SetFPos
  30080.  
  30081. Parameter block
  30082.   -->    12    ioCompletion  pointer
  30083.   <--    16    ioResult      word
  30084.   -->    24    ioRefNum      word
  30085.   -->    44    ioPosMode     word
  30086.   <->    46    ioPosOffset   long word
  30087.  
  30088. PBSetFPos sets the mark of the open file whose access path is specified by ioRefNum
  30089. to the position specified by ioPosMode and ioPosOffset. The position at which the
  30090. mark is actually set is returned in ioPosOffset. If you try to set the mark past the
  30091. logical end-of-file, PBSetFPos moves the mark to the end-of-file and returns eofErr
  30092. as its function result.
  30093.  
  30094. Result codes    noErr     No error
  30095.                 eofErr    End-of-file
  30096.                 extFSErr  External file system
  30097.                 fnOpnErr  File not open
  30098.                 ioErr     I/O error
  30099.                 posErr    Attempt to position before start of file
  30100.                 rfNumErr  Bad reference number
  30101.  
  30102. æKY PBSetFPosAsync
  30103. æFc Files.h
  30104. æT Function
  30105. æTN A444
  30106. æD #pragma parameter __D0 PBSetFPosAsync(__A0)
  30107. pascal OSErr PBSetFPosAsync(ParmBlkPtr paramBlock)
  30108.     = 0xA444; 
  30109. æDT #pragma parameter __D0 myVariable = PBSetFPosAsync()(__A0);
  30110. æRI II-111, IV-141
  30111. æC 
  30112. Trap macro    _SetFPos
  30113.  
  30114. Parameter block
  30115.   -->    12    ioCompletion  pointer
  30116.   <--    16    ioResult      word
  30117.   -->    24    ioRefNum      word
  30118.   -->    44    ioPosMode     word
  30119.   <->    46    ioPosOffset   long word
  30120.  
  30121. PBSetFPos sets the mark of the open file whose access path is specified by ioRefNum
  30122. to the position specified by ioPosMode and ioPosOffset. The position at which the
  30123. mark is actually set is returned in ioPosOffset. If you try to set the mark past the
  30124. logical end-of-file, PBSetFPos moves the mark to the end-of-file and returns eofErr
  30125. as its function result.
  30126.  
  30127. Result codes    noErr     No error
  30128.                 eofErr    End-of-file
  30129.                 extFSErr  External file system
  30130.                 fnOpnErr  File not open
  30131.                 ioErr     I/O error
  30132.                 posErr    Attempt to position before start of file
  30133.                 rfNumErr  Bad reference number
  30134.  
  30135. æKY PBFlushFile
  30136. æFc Files.h
  30137. æT Function
  30138. æD pascal OSErr PBFlushFile(ParmBlkPtr paramBlock,Boolean async); 
  30139. æDT OSErr myVariable = PBFlushFile((ParmBlkPtr) paramBlock,(Boolean) async);
  30140. æRI II-114, IV-144
  30141. æC 
  30142. Trap macro    _FlushFile
  30143.  
  30144. Parameter block
  30145.   -->    12    ioCompletion  pointer
  30146.   <--    16    ioResult      word
  30147.   -->    24    ioRefNum      word
  30148.  
  30149. PBFlushFile writes the contents of the access path buffer indicated by ioRefNum to
  30150. the volume, and updates the file’s entry in the file directory (or in the file catalog,
  30151. in the case of hierarchical volumes).
  30152.  
  30153. Warning:  Some information stored on the volume won’t be correct
  30154.           until PBFlushVol is called.
  30155.  
  30156. Result codes    noErr      No error
  30157.                 extFSErr   External file system
  30158.                 fnfErr     File not found
  30159.                 fnOpnErr   File not open
  30160.                 ioErr      I/O error
  30161.                 nsvErr     No such volume
  30162.                 rfNumErr   Bad reference number
  30163.  
  30164. æKY PBFlushFileSync
  30165. æFc Files.h
  30166. æT Function
  30167. æTN A045
  30168. æD #pragma parameter __D0 PBFlushFileSync(__A0)
  30169. pascal OSErr PBFlushFileSync(ParmBlkPtr paramBlock)
  30170.     = 0xA045; 
  30171. æDT #pragma parameter __D0 myVariable = PBFlushFileSync()(__A0);
  30172. æRI II-114, IV-144
  30173. æC 
  30174. Trap macro    _FlushFile
  30175.  
  30176. Parameter block
  30177.   -->    12    ioCompletion  pointer
  30178.   <--    16    ioResult      word
  30179.   -->    24    ioRefNum      word
  30180.  
  30181. PBFlushFile writes the contents of the access path buffer indicated by ioRefNum to
  30182. the volume, and updates the file’s entry in the file directory (or in the file catalog,
  30183. in the case of hierarchical volumes).
  30184.  
  30185. Warning:  Some information stored on the volume won’t be correct
  30186.           until PBFlushVol is called.
  30187.  
  30188. Result codes    noErr      No error
  30189.                 extFSErr   External file system
  30190.                 fnfErr     File not found
  30191.                 fnOpnErr   File not open
  30192.                 ioErr      I/O error
  30193.                 nsvErr     No such volume
  30194.                 rfNumErr   Bad reference number
  30195.  
  30196. æKY PBFlushFileAsync
  30197. æFc Files.h
  30198. æT Function
  30199. æTN A445
  30200. æD #pragma parameter __D0 PBFlushFileAsync(__A0)
  30201. pascal OSErr PBFlushFileAsync(ParmBlkPtr paramBlock)
  30202.     = 0xA445; 
  30203. æDT #pragma parameter __D0 myVariable = PBFlushFileAsync()(__A0);
  30204. æRI II-114, IV-144
  30205. æC 
  30206. Trap macro    _FlushFile
  30207.  
  30208. Parameter block
  30209.   -->    12    ioCompletion  pointer
  30210.   <--    16    ioResult      word
  30211.   -->    24    ioRefNum      word
  30212.  
  30213. PBFlushFile writes the contents of the access path buffer indicated by ioRefNum to
  30214. the volume, and updates the file’s entry in the file directory (or in the file catalog,
  30215. in the case of hierarchical volumes).
  30216.  
  30217. Warning:  Some information stored on the volume won’t be correct
  30218.           until PBFlushVol is called.
  30219.  
  30220. Result codes    noErr      No error
  30221.                 extFSErr   External file system
  30222.                 fnfErr     File not found
  30223.                 fnOpnErr   File not open
  30224.                 ioErr      I/O error
  30225.                 nsvErr     No such volume
  30226.                 rfNumErr   Bad reference number
  30227.  
  30228. æKY PBMountVol
  30229. æFc Files.h
  30230. æT Function
  30231. æTN A00F
  30232. æD #pragma parameter __D0 PBMountVol(__A0)
  30233. pascal OSErr PBMountVol(ParmBlkPtr paramBlock)
  30234.     = 0xA00F; 
  30235. æDT #pragma parameter __D0 myVariable = PBMountVol()(__A0);
  30236. æMM
  30237. æRT 134
  30238. æRI II-103, IV-128
  30239. æC 
  30240. »Accessing Volumes
  30241.  
  30242. To get the volume reference number of a volume, given the path reference number of a
  30243. file on that volume, both Pascal and assembly-language programmers can call the
  30244. high-level File Manager function GetVRefNum. Assembly-language programmers may prefer
  30245. calling the function GetFCBInfo (described below in the section “Data Structures in
  30246. Memory”).
  30247.  
  30248. FUNCTION PBMountVol (paramBlock:  ParmBlkPtr) :  OSErr;
  30249.  
  30250. Trap macro    _MountVol
  30251.  
  30252. Parameter block
  30253.   <--    16    ioResult   word
  30254.   <->    22    ioVRefNum  word
  30255.  
  30256. PBMountVol mounts the volume in the drive specified by ioVRefNum, and returns a
  30257. volume reference number in ioVRefNum. If there are no volumes already mounted, this
  30258. volume becomes the default volume. PBMountVol is always executed synchronously.
  30259.  
  30260. Note:  When mounting hierarchical volumes, PBMountVol opens two files
  30261.        needed for maintaining file directory and file mapping information.
  30262.        PBMountVol can fail if there are no access paths available for these
  30263.        two files; it will return tmfoErr as its function result.
  30264.  
  30265. Result codes    noErr        No error
  30266.                 badMDBErr    Bad master directory block
  30267.                 extFSErr     External file system
  30268.                 ioErr        I/O error
  30269.                 memFullErr   Not enough room in heap zone
  30270.                 noMacDskErr  Not a Macintosh disk
  30271.                 nsDrvErr     No such drive
  30272.                 paramErr     Bad drive number
  30273.                 tmfoErr      Too many files open
  30274.                 volOnLinErr  Volume already on-line
  30275.  
  30276. æKY PBUnmountVol
  30277. æFc Files.h
  30278. æT Function
  30279. æTN A00E
  30280. æD #pragma parameter __D0 PBUnmountVol(__A0)
  30281. pascal OSErr PBUnmountVol(ParmBlkPtr paramBlock)
  30282.     = 0xA00E; 
  30283. æDT #pragma parameter __D0 myVariable = PBUnmountVol()(__A0);
  30284. æRI II-106, IV-134
  30285. æC 
  30286. Trap macro    _UnmountVol
  30287.  
  30288. Parameter block
  30289.   <--    16    ioResult   word
  30290.   -->    18    ioNamePtr  pointer
  30291.   -->    22    ioVRefNum  word
  30292.  
  30293. PBUnmountVol unmounts the volume specified by ioNamePtr or ioVRefNum, by calling
  30294. PBFlushVol to flush the volume, closing all open files on the volume, and releasing
  30295. the memory used for the volume. PBUnmountVol is always executed synchronously.
  30296.  
  30297. Warning:  Don’t unmount the startup volume.
  30298.  
  30299. Note:  Unmounting a volume does not close working directories; to release
  30300.        the memory allocated to a working directory, call PBCloseWD.
  30301.  
  30302. Result codes    noErr     No error
  30303.                 bdNamErr  Bad volume name
  30304.                 extFSErr  External file system
  30305.                 ioErr     I/O error
  30306.                 nsDrvErr  No such drive
  30307.                 nsvErr    No such volume
  30308.                 paramErr  No default volume
  30309.  
  30310. æKY PBEject
  30311. æFc Files.h
  30312. æT Function
  30313. æTN A017
  30314. æD #pragma parameter __D0 PBEject(__A0)
  30315. pascal OSErr PBEject(ParmBlkPtr paramBlock)
  30316.     = 0xA017; 
  30317. æDT #pragma parameter __D0 myVariable = PBEject()(__A0);
  30318. æMM
  30319. æRI II-107, IV-135
  30320. æC 
  30321. Trap macro    _Eject
  30322.  
  30323. Parameter block
  30324.   -->    12    ioCompletion  pointer
  30325.   <--    16    ioResult      word
  30326.   -->    18    ioNamePtr     pointer
  30327.   -->    22    ioVRefNum     word
  30328.  
  30329. PBEject flushes the volume specified by ioNamePtr or ioVRefNum, places it
  30330. off-line, and then ejects the volume.
  30331.  
  30332. Assembly-language note:  You may invoke the macro _Eject asynchronously;
  30333.                          the first part of the call is executed synchronously,
  30334.                          and the actual ejection is executed asynchronously.
  30335.  
  30336. Result codes    noErr     No error
  30337.                 bdNamErr  Bad volume name
  30338.                 extFSErr  External file system
  30339.                 ioErr     I/O error
  30340.                 nsDrvErr  No such drive
  30341.                 nsvErr    No such volume
  30342.                 paramErr  No default volume
  30343.  
  30344. æKY PBOffLine
  30345. æFc Files.h
  30346. æT Function
  30347. æTN A035
  30348. æD #pragma parameter __D0 PBOffLine(__A0)
  30349. pascal OSErr PBOffLine(ParmBlkPtr paramBlock)
  30350.     = 0xA035; 
  30351. æDT #pragma parameter __D0 myVariable = PBOffLine()(__A0);
  30352. æMM
  30353. æRI II-106, IV-134
  30354. æC 
  30355. Trap macro    _OffLine
  30356.  
  30357. Parameter block
  30358.   -->    12    ioCompletion  pointer
  30359.   <--    16    ioResult      word
  30360.   -->    18    ioNamePtr     pointer
  30361.   -->    22    ioVRefNum     word
  30362.  
  30363. PBOffLine places off-line the volume specified by ioNamePtr or ioVRefNum, by calling
  30364. PBFlushVol to flush the volume and releasing all the memory used for the volume
  30365. except for the volume control block. PBOffLine is always executed synchronously.
  30366.  
  30367. Result codes    noErr     No error
  30368.                 bdNamErr  Bad volume name
  30369.                 extFSErr  External file system
  30370.                 ioErr     I/O error
  30371.                 nsDrvErr  No such drive
  30372.                 nsvErr    No such volume
  30373.                 paramErr  No default volume
  30374.  
  30375. æKY PBCatSearch
  30376. æFc Files.h
  30377. æT Function
  30378. æD pascal OSErr PBCatSearch(CSParamPtr paramBlock,Boolean async); 
  30379. æDT OSErr myVariable = PBCatSearch((CSParamPtr) paramBlock,(Boolean) async);
  30380. æMM
  30381. æRI PBOffLine function II-106, IV-134
  30382.  
  30383. æC 
  30384.  
  30385. æKY PBCatSearchSync
  30386. æFc Files.h
  30387. æT Function
  30388. æTN 7018,A260
  30389. æD #pragma parameter __D0 PBCatSearchSync(__A0)
  30390. pascal OSErr PBCatSearchSync(CSParamPtr paramBlock)
  30391.     = {0x7018,0xA260}; 
  30392. æDT #pragma parameter __D0 myVariable = PBCatSearchSync()(__A0);
  30393. æMM
  30394. æRI PBOffLine function II-106, IV-134
  30395.  
  30396. æC 
  30397.  
  30398. æKY PBCatSearchAsync
  30399. æFc Files.h
  30400. æT Function
  30401. æTN 7018,A660
  30402. æD #pragma parameter __D0 PBCatSearchAsync(__A0)
  30403. pascal OSErr PBCatSearchAsync(CSParamPtr paramBlock)
  30404.     = {0x7018,0xA660}; 
  30405. æDT #pragma parameter __D0 myVariable = PBCatSearchAsync()(__A0);
  30406. æMM
  30407. æRI PBOffLine function II-106, IV-134
  30408.  
  30409. æC 
  30410.  
  30411. æKY AddDrive
  30412. æFc Files.h
  30413. æT Function
  30414. æD pascal void AddDrive(short drvrRefNum,short drvNum,DrvQElPtr qEl); 
  30415. æDT AddDrive((short) drvrRefNum,(short) drvNum,(DrvQElPtr) qEl);
  30416. æRT 36, 108 
  30417. æRI N36, N108-1
  30418. æC 
  30419.  
  30420. æKY FSOpen
  30421. æFc Files.h
  30422. æT Function
  30423. æD pascal OSErr FSOpen(ConstStr255Param fileName,short vRefNum,short *refNum); 
  30424. æDT OSErr myVariable = FSOpen((ConstStr255Param) fileName,(short) vRefNum,(short *) refNum);
  30425. æRT 102
  30426. æRI II-91, IV-109, P-131, 171
  30427. æC  
  30428. [Not in ROM]
  30429.  
  30430. FSOpen creates an access path to the file having the name fileName on the volume
  30431. specified by vRefNum. A path reference number is returned in refNum. The access
  30432. path’s read/write permission is set to whatever the file’s open permission allows.
  30433.  
  30434. Note:  There’s no guarantee that any bytes have been written until
  30435.        FlushVol is called.
  30436.  
  30437. Result codes    noErr       No error
  30438.                 bdNamErr    Bad file name
  30439.                 extFSErr    External file system
  30440.                 fnfErr      File not found
  30441.                 ioErr       I/O error
  30442.                 nsvErr      No such volume
  30443.                 opWrErr     File already open for writing
  30444.                 tmfoErr     Too many files open
  30445.  
  30446. æKY OpenDF
  30447. æFc Files.h
  30448. æT Function
  30449. æD pascal OSErr OpenDF(ConstStr255Param fileName,short vRefNum,short *refNum); 
  30450. æDT OSErr myVariable = OpenDF((ConstStr255Param) fileName,(short) vRefNum,(short *) refNum);
  30451. æRT 102
  30452. æRI II-91, IV-109, P-131, 171
  30453. æC  
  30454. [Not in ROM]
  30455.  
  30456. FSOpen creates an access path to the file having the name fileName on the volume
  30457. specified by vRefNum. A path reference number is returned in refNum. The access
  30458. path’s read/write permission is set to whatever the file’s open permission allows.
  30459.  
  30460. Note:  There’s no guarantee that any bytes have been written until
  30461.        FlushVol is called.
  30462.  
  30463. Result codes    noErr       No error
  30464.                 bdNamErr    Bad file name
  30465.                 extFSErr    External file system
  30466.                 fnfErr      File not found
  30467.                 ioErr       I/O error
  30468.                 nsvErr      No such volume
  30469.                 opWrErr     File already open for writing
  30470.                 tmfoErr     Too many files open
  30471.  
  30472. æKY fsopen
  30473. æFc Files.h
  30474. æT Function
  30475. æD OSErr fsopen(char *fileName,short vRefNum,short *refNum); 
  30476. æDT OSErr myVariable = fsopen((char *) fileName,(short) vRefNum,(short *) refNum);
  30477. æC 
  30478.  
  30479. æKY FSClose
  30480. æFc Files.h
  30481. æT Function
  30482. æD pascal OSErr FSClose(short refNum); 
  30483. æDT OSErr myVariable = FSClose((short) refNum);
  30484. æRT 102
  30485. æRI II-94, IV-112, P-132, 133, 171
  30486. æC  
  30487. [Not in ROM]
  30488.  
  30489. FSClose removes the access path specified by refNum, writes the contents of the
  30490. volume buffer to the volume, and updates the file’s entry in the file directory.
  30491.  
  30492. Note:  There’s no guarantee that any bytes have been written until
  30493.        FlushVol is called.
  30494.  
  30495. Result codes    noErr       No error
  30496.                 extFSErr    External file system
  30497.                 fnfErr      File not found
  30498.                 fnOpnErr    File not open
  30499.                 ioErr       I/O error
  30500.                 nsvErr      No such volume
  30501.                 rfNumErr    Bad reference number
  30502.  
  30503. æKY FSRead
  30504. æFc Files.h
  30505. æT Function
  30506. æD pascal OSErr FSRead(short refNum,long *count,void *buffPtr); 
  30507. æDT OSErr myVariable = FSRead((short) refNum,(long *) count,(void *) buffPtr);
  30508. æRI IV-109, P-131, 171
  30509. æC  
  30510. [Not in ROM]
  30511.  
  30512. FSRead attempts to read the number of bytes specified by the count parameter from the
  30513. open file whose access path is specified by refNum, and transfer them to the data
  30514. buffer pointed to by buffPtr. The read operation begins at the current mark, so you
  30515. might want to precede this with a call to SetFPos. If you try to read past the logical
  30516. end-of-file, FSRead moves the mark to the end-of-file and returns eofErr as its
  30517. function result. After the read is completed, the number of bytes actually read is
  30518. returned in the count parameter.
  30519.  
  30520. Result codes    noErr       No error
  30521.                 eofErr      End-of-file
  30522.                 extFSErr    External file system
  30523.                 fnOpnErr    File not open
  30524.                 ioErr       I/O error
  30525.                 paramErr    Negative count
  30526.                 rfNumErr    Bad reference number
  30527.  
  30528. æKY FSWrite
  30529. æFc Files.h
  30530. æT Function
  30531. æD pascal OSErr FSWrite(short refNum,long *count,const void *buffPtr); 
  30532. æDT OSErr myVariable = FSWrite((short) refNum,(long *) count,(const void *) buffPtr);
  30533. æRI IV-110, P-132, 171
  30534. æC  
  30535. [Not in ROM]
  30536.  
  30537. FSWrite takes the number of bytes specified by the count parameter from the buffer
  30538. pointed to by buffPtr and attempts to write them to the open file whose access path
  30539. is specified by refNum. The write operation begins at the current mark, so you might
  30540. want to precede this with a call to SetFPos. After the write is completed, the number
  30541. of bytes actually written is returned in the count parameter.
  30542.  
  30543. Result codes    noErr        No error
  30544.                 dskFulErr    Disk full
  30545.                 fLckdErr     File locked
  30546.                 fnOpnErr     File not open
  30547.                 ioErr        I/O error
  30548.                 paramErr     Negative count
  30549.                 rfNumErr     Bad reference number
  30550.                 vLckdErr     Software volume lock
  30551.                 wPrErr       Hardware volume lock
  30552.                 wrPermErr    Read/write permission doesn’t allow writing
  30553.  
  30554. æKY GetVInfo
  30555. æFc Files.h
  30556. æT Function
  30557. æD pascal OSErr GetVInfo(short drvNum,StringPtr volName,short *vRefNum,long *freeBytes); 
  30558. æDT OSErr myVariable = GetVInfo((short) drvNum,(StringPtr) volName,(short *) vRefNum,(long *) freeBytes);
  30559. æRT 157
  30560. æRI II-89, IV-107, N157, low-level  II-104, IV-129
  30561. æC 
  30562. »Accessing Volumes
  30563.  
  30564. •••Refer to Technical Note #24:•••
  30565.  
  30566. FUNCTION GetVInfo (drvNum:  INTEGER; volName:  StringPtr; VAR vRefNum:  INTEGER;
  30567.                    VAR freeBytes:  LONGINT) :  OSErr; [Not in ROM]
  30568.  
  30569. •••Refer to Technical Note #157:•••
  30570.  
  30571. GetVInfo returns the name, reference number, and available space (in bytes), in
  30572. volName, vRefNum, and freeBytes, for the volume in the drive specified by drvNum.
  30573.  
  30574. Result codes    noErr       No error
  30575.                 nsvErr      No default volume
  30576.                 paramErr    Bad drive number
  30577.  
  30578. æKY getvinfo
  30579. æFc Files.h
  30580. æT Function
  30581. æD OSErr getvinfo(short drvNum,char *volName,short *vRefNum,long *freeBytes); 
  30582. æDT OSErr myVariable = getvinfo((short) drvNum,(char *) volName,(short *) vRefNum,(long *) freeBytes);
  30583. æC 
  30584.  
  30585. æKY GetFInfo
  30586. æFc Files.h
  30587. æT Function
  30588. æD pascal OSErr GetFInfo(ConstStr255Param fileName,short vRefNum,FInfo *fndrInfo); 
  30589. æDT OSErr myVariable = GetFInfo((ConstStr255Param) fileName,(short) vRefNum,(FInfo *) fndrInfo);
  30590. æRI II-95, IV-113
  30591. æC  
  30592. [Not in ROM]
  30593.  
  30594. For the file having the name fileName on the specified volume, GetFInfo returns
  30595. information used by the Finder in fndrInfo (see the section “Information Used by the
  30596. Finder”).
  30597.  
  30598. Result codes    noErr       No error
  30599.                 bdNamErr    Bad file name
  30600.                 extFSErr    External file system
  30601.                 fnfErr      File not found
  30602.                 ioErr       I/O error
  30603.                 nsvErr      No such volume
  30604.                 paramErr    No default volume
  30605.  
  30606. æKY getfinfo
  30607. æFc Files.h
  30608. æT Function
  30609. æD OSErr getfinfo(char *fileName,short vRefNum,FInfo *fndrInfo); 
  30610. æDT OSErr myVariable = getfinfo((char *) fileName,(short) vRefNum,(FInfo *) fndrInfo);
  30611. æC 
  30612.  
  30613. æKY GetVol
  30614. æFc Files.h
  30615. æT Function
  30616. æD pascal OSErr GetVol(StringPtr volName,short *vRefNum); 
  30617. æDT OSErr myVariable = GetVol((StringPtr) volName,(short *) vRefNum);
  30618. æRT 77,140
  30619. æRI N77-2, N140 high-level  II-89, IV-107  low-level  II-104, IV-131
  30620. æC  
  30621. [Not in ROM]
  30622.  
  30623. GetVol returns the name of the default volume in volName and its volume reference
  30624. number in vRefNum.
  30625.  
  30626. Result codes    noErr     No error
  30627.                 nsvErr    No such volume
  30628.  
  30629. æKY getvol
  30630. æFc Files.h
  30631. æT Function
  30632. æD OSErr getvol(char *volName,short *vRefNum); 
  30633. æDT OSErr myVariable = getvol((char *) volName,(short *) vRefNum);
  30634. æC 
  30635.  
  30636. æKY SetVol
  30637. æFc Files.h
  30638. æT Function
  30639. æD pascal OSErr SetVol(StringPtr volName,short vRefNum); 
  30640. æDT OSErr myVariable = SetVol((StringPtr) volName,(short) vRefNum);
  30641. æRI II-89, IV-107  low-level II-105, IV-132
  30642. æC  
  30643. [Not in ROM]
  30644.  
  30645. SetVol sets the default volume to the mounted volume specified by volName or vRefNum.
  30646.  
  30647. Result codes    noErr       No error
  30648.                 bdNamErr    Bad volume name
  30649.                 nsvErr      No such volume
  30650.                 paramErr    No default volume
  30651.  
  30652. æKY setvol
  30653. æFc Files.h
  30654. æT Function
  30655. æD OSErr setvol(char *volName,short vRefNum); 
  30656. æDT OSErr myVariable = setvol((char *) volName,(short) vRefNum);
  30657. æC 
  30658.  
  30659. æKY UnmountVol
  30660. æFc Files.h
  30661. æT Function
  30662. æD pascal OSErr UnmountVol(StringPtr volName,short vRefNum); 
  30663. æDT OSErr myVariable = UnmountVol((StringPtr) volName,(short) vRefNum);
  30664. æRT 180
  30665. æRI II-90, IV-108  low-level II-106, IV-134
  30666. æC  
  30667. [Not in ROM]
  30668.  
  30669. UnmountVol unmounts the volume specified by volName or vRefNum, by calling FlushVol
  30670. to flush the volume buffer, closing all open files on the volume, and releasing the
  30671. memory used for the volume.
  30672.  
  30673. Warning:  Don’t unmount the startup volume.
  30674.  
  30675. Result codes    noErr        No error
  30676.                 bdNamErr     Bad volume name
  30677.                 extFSErr     External file system
  30678.                 ioErr        I/O error
  30679.                 nsDrvErr     No such drive
  30680.                 nsvErr       No such volume
  30681.                 paramErr     No default volume
  30682.  
  30683. æKY unmountvol
  30684. æFc Files.h
  30685. æT Function
  30686. æD OSErr unmountvol(char *volName,short vRefNum); 
  30687. æDT OSErr myVariable = unmountvol((char *) volName,(short) vRefNum);
  30688. æC 
  30689.  
  30690. æKY Eject
  30691. æFc Files.h
  30692. æT Function
  30693. æD pascal OSErr Eject(StringPtr volName,short vRefNum); 
  30694. æDT OSErr myVariable = Eject((StringPtr) volName,(short) vRefNum);
  30695. æMM
  30696. æRI II-90, IV-108 low-level  II-107, IV-135
  30697. æC  
  30698. [Not in ROM]
  30699.  
  30700. Eject flushes the volume specified by volName or vRefNum, places it off-line, and
  30701. then ejects the volume.
  30702.  
  30703. Result codes    noErr       No error
  30704.                 bdNamErr    Bad volume name
  30705.                 extFSErr    External file system
  30706.                 ioErr       I/O error
  30707.                 nsDrvErr    No such drive
  30708.                 nsvErr      No such volume
  30709.                 paramErr    No default volume
  30710.  
  30711. æKY eject
  30712. æFc Files.h
  30713. æT Function
  30714. æD OSErr eject(char *volName,short vRefNum); 
  30715. æDT OSErr myVariable = eject((char *) volName,(short) vRefNum);
  30716. æC 
  30717.  
  30718. æKY FlushVol
  30719. æFc Files.h
  30720. æT Function
  30721. æD pascal OSErr FlushVol(StringPtr volName,short vRefNum); 
  30722. æDT OSErr myVariable = FlushVol((StringPtr) volName,(short) vRefNum);
  30723. æMM
  30724. æRI P-132, 133 high-level  II-89, IV-108 low-level  II-105, IV-133
  30725. æC  
  30726. [Not in ROM]
  30727.  
  30728. On the volume specified by volName or vRefNum, FlushVol writes the contents of the
  30729. associated volume buffer and descriptive information about the volume (if they’ve
  30730. changed since the last time FlushVol was called).
  30731.  
  30732. Result codes    noErr       No error
  30733.                 bdNamErr    Bad volume name
  30734.                 extFSErr    External file system
  30735.                 ioErr       I/O error
  30736.                 nsDrvErr    No such drive
  30737.                 nsvErr      No such volume
  30738.                 paramErr    No default volume
  30739.  
  30740. æKY flushvol
  30741. æFc Files.h
  30742. æT Function
  30743. æD OSErr flushvol(char *volName,short vRefNum); 
  30744. æDT OSErr myVariable = flushvol((char *) volName,(short) vRefNum);
  30745. æC 
  30746.  
  30747. æKY Create
  30748. æFc Files.h
  30749. æT Function
  30750. æD pascal OSErr Create(ConstStr255Param fileName,short vRefNum,OSType creator,
  30751.     OSType fileType); 
  30752. æDT OSErr myVariable = Create((ConstStr255Param) fileName,(short) vRefNum,(OSType) creator,()
  30753.     OSType fileType);
  30754. æRI II-90, IV-112 low-level II-107, IV-145
  30755. æC  
  30756. [Not in ROM]
  30757.  
  30758. Create creates a new file (both forks) with the specified name, file type, and creator
  30759. on the specified volume. (File type and creator are discussed in the Finder Interface
  30760. chapter.) The new file is unlocked and empty. The date and time of its creation and
  30761. last modification are set to the current date and time.
  30762.  
  30763. Result codes    noErr        No error
  30764.                 bdNamErr     Bad file name
  30765.                 dupFNErr     Duplicate file name and version
  30766.                 dirFulErr    File directory full
  30767.                 extFSErr     External file system
  30768.                 ioErr        I/O error
  30769.                 nsvErr       No such volume
  30770.                 vLckdErr     Software volume lock
  30771.                 wPrErr       Hardware volume lock
  30772.  
  30773. æKY create
  30774. æFc Files.h
  30775. æT Function
  30776. æD OSErr create(char *fileName,short vRefNum,OSType creator,OSType fileType); 
  30777. æDT OSErr myVariable = create((char *) fileName,(short) vRefNum,(OSType) creator,(OSType) fileType);
  30778. æRI II-90, IV-112 low-level II-107, IV-145
  30779. æC     Create creates a new file (both forks) with the specified name,
  30780. file type, and creator on the specified volume. (File type and
  30781. creator are discussed in the Finder Interface chapter.)
  30782. The new file is unlocked and empty. The date and time of its
  30783. creation and last modification are set to the current date and time.
  30784.  
  30785. Result codes
  30786.  
  30787.     noErr       No error
  30788.     bdNamErr    Bad file name
  30789.     dupFNErr    Duplicate file name and version
  30790.     dirFulErr   File directory full
  30791.     extFSErr    External file system
  30792.     ioErr       I/O error
  30793.     nsvErr      No such volume
  30794.     vLckdErr    Software volume lock
  30795.     wPrErr      Hardware volume lock
  30796.  
  30797. æKY FSDelete
  30798. æFc Files.h
  30799. æT Function
  30800. æD pascal OSErr FSDelete(ConstStr255Param fileName,short vRefNum); 
  30801. æDT OSErr myVariable = FSDelete((ConstStr255Param) fileName,(short) vRefNum);
  30802. æRI II-97, IV-113
  30803. æC 
  30804. [Not in ROM]
  30805.  
  30806. FSDelete removes the closed file having the name fileName from the specified volume.
  30807.  
  30808. Note:  This function will delete both forks of a file.
  30809.  
  30810. Result codes    noErr       No error
  30811.                 bdNamErr    Bad file name
  30812.                 extFSErr    External file system
  30813.                 fBsyErr     File busy
  30814.                 fLckdErr    File locked
  30815.                 fnfErr      File not found
  30816.                 ioErr       I/O error
  30817.                 nsvErr      No such volume
  30818.                 vLckdErr    Software volume lock
  30819.                 wPrErr      Hardware volume lock
  30820.  
  30821. æKY fsdelete
  30822. æFc Files.h
  30823. æT Function
  30824. æD OSErr fsdelete(char *fileName,short vRefNum); 
  30825. æDT OSErr myVariable = fsdelete((char *) fileName,(short) vRefNum);
  30826. æC 
  30827.  
  30828. æKY OpenRF
  30829. æFc Files.h
  30830. æT Function
  30831. æD pascal OSErr OpenRF(ConstStr255Param fileName,short vRefNum,short *refNum); 
  30832. æDT OSErr myVariable = OpenRF((ConstStr255Param) fileName,(short) vRefNum,(short *) refNum);
  30833. æRT 74
  30834. æRI II-91, IV-109 low-level II-109, IV-137
  30835. æC  
  30836. [Not in ROM]
  30837.  
  30838. OpenRF is similar to FSOpen; the only difference is that OpenRF opens the resource
  30839. fork of the specified file rather than the data fork. A path reference number is
  30840. returned in refNum. The access path’s read/write permission is set to whatever the
  30841. file’s open permission allows.
  30842.  
  30843. Note:  Normally you should access a file’s resource fork through the
  30844.        routines of the Resource Manager rather than the File Manager.
  30845.        OpenRF doesn’t read the resource map into memory; it’s really
  30846.        only useful for block-level operations such as copying files.
  30847.  
  30848. Result codes    noErr       No error
  30849.                 bdNamErr    Bad file name
  30850.                 extFSErr    External file system
  30851.                 fnfErr      File not found
  30852.                 ioErr       I/O error
  30853.                 nsvErr      No such volume
  30854.                 opWrErr     File already open for writing
  30855.                 tmfoErr     Too many files open
  30856.  
  30857. æKY openrf
  30858. æFc Files.h
  30859. æT Function
  30860. æD OSErr openrf(char *fileName,short vRefNum,short *refNum); 
  30861. æDT OSErr myVariable = openrf((char *) fileName,(short) vRefNum,(short *) refNum);
  30862. æC 
  30863.  
  30864. æKY Rename
  30865. æFc Files.h
  30866. æT Function
  30867. æD pascal OSErr Rename(ConstStr255Param oldName,short vRefNum,ConstStr255Param newName); 
  30868. æDT OSErr myVariable = Rename((ConstStr255Param) oldName,(short) vRefNum,(ConstStr255Param) newName);
  30869. æRI II-96, IV-114  low-level II-118, IV-153
  30870. æC  
  30871. [Not in ROM]
  30872.  
  30873. Given a file name in oldName, Rename changes the name of the file to newName. Access
  30874. paths currently in use aren’t affected. Given a volume name in oldName or a volume
  30875. reference number in vRefNum, Rename changes the name of the specified volume to
  30876. newName.
  30877.  
  30878. Warning:  If you’re renaming a volume, be sure that both names end with a colon.
  30879.  
  30880. Result codes    noErr        No error
  30881.                 bdNamErr     Bad file name
  30882.                 dirFulErr    Directory full
  30883.                 dupFNErr     Duplicate file name
  30884.                 extFSErr     External file system
  30885.                 fLckdErr     File locked
  30886.                 fnfErr       File not found
  30887.                 fsRnErr      Problem during rename
  30888.                 ioErr        I/O error
  30889.                 nsvErr       No such volume
  30890.                 paramErr     No default volume
  30891.                 vLckdErr     Software volume lock
  30892.                 wPrErr       Hardware volume lock
  30893.  
  30894. æKY fsrename
  30895. æFc Files.h
  30896. æT Function
  30897. æD OSErr fsrename(char *oldName,short vRefNum,char *newName); 
  30898. æDT OSErr myVariable = fsrename((char *) oldName,(short) vRefNum,(char *) newName);
  30899. æRI II-96, IV-114  low-level II-118, IV-153
  30900. æC fsrename is actually the "c" version of the Macintosh ROM call, Rename,
  30901. which uses c strings. It was not named "rename" to avoid conflict 
  30902. with the ANSI call by that name.
  30903.  
  30904. æKY SetFInfo
  30905. æFc Files.h
  30906. æT Function
  30907. æD pascal OSErr SetFInfo(ConstStr255Param fileName,short vRefNum,const FInfo *fndrInfo); 
  30908. æDT OSErr myVariable = SetFInfo((ConstStr255Param) fileName,(short) vRefNum,(const FInfo *) fndrInfo);
  30909. æRI II-95, IV-114
  30910. æC  
  30911. [Not in ROM]
  30912.  
  30913. For the file having the name fileName on the specified volume, SetFInfo sets information
  30914. used by the Finder to fndrInfo (see the section “Information Used by the Finder”).
  30915.  
  30916. Result codes    noErr        No error
  30917.                 extFSErr     External file system
  30918.                 fLckdErr     File locked
  30919.                 fnfErr       File not found
  30920.                 ioErr        I/O error
  30921.                 nsvErr       No such volume
  30922.                 vLckdErr     Software volume lock
  30923.                 wPrErr       Hardware volume lock
  30924.  
  30925. æKY setfinfo
  30926. æFc Files.h
  30927. æT Function
  30928. æD OSErr setfinfo(char *fileName,short vRefNum,FInfo *fndrInfo); 
  30929. æDT OSErr myVariable = setfinfo((char *) fileName,(short) vRefNum,(FInfo *) fndrInfo);
  30930. æC 
  30931.  
  30932. æKY SetFLock
  30933. æFc Files.h
  30934. æT Function
  30935. æD pascal OSErr SetFLock(ConstStr255Param fileName,short vRefNum); 
  30936. æDT OSErr myVariable = SetFLock((ConstStr255Param) fileName,(short) vRefNum);
  30937. æRI II-95, IV-114
  30938. æC  
  30939. [Not in ROM]
  30940.  
  30941. SetFLock locks the file having the name fileName on the specified volume. Access
  30942. paths currently in use aren’t affected.
  30943.  
  30944. Result codes    noErr       No error
  30945.                 extFSErr    External file system
  30946.                 fnfErr      File not found
  30947.                 ioErr       I/O error
  30948.                 nsvErr      No such volume
  30949.                 vLckdErr    Software volume lock
  30950.                 wPrErr      Hardware volume lock
  30951.  
  30952. æKY setflock
  30953. æFc Files.h
  30954. æT Function
  30955. æD OSErr setflock(char *fileName,short vRefNum); 
  30956. æDT OSErr myVariable = setflock((char *) fileName,(short) vRefNum);
  30957. æC 
  30958.  
  30959. æKY RstFLock
  30960. æFc Files.h
  30961. æT Function
  30962. æD pascal OSErr RstFLock(ConstStr255Param fileName,short vRefNum); 
  30963. æDT OSErr myVariable = RstFLock((ConstStr255Param) fileName,(short) vRefNum);
  30964. æRI II-96, IV-114
  30965. æC 
  30966. [Not in ROM]
  30967.  
  30968. RstFLock unlocks the file having the name fileName on the specified volume. Access
  30969. paths currently in use aren’t affected.
  30970.  
  30971. Result codes    noErr       No error
  30972.                 extFSErr    External file system
  30973.                 fnfErr      File not found
  30974.                 ioErr       I/O error
  30975.                 nsvErr      No such volume
  30976.                 vLckdErr    Software volume lock
  30977.                 wPrErr      Hardware volume lock
  30978.  
  30979. æKY rstflock
  30980. æFc Files.h
  30981. æT Function
  30982. æD OSErr rstflock(char *fileName,short vRefNum); 
  30983. æDT OSErr myVariable = rstflock((char *) fileName,(short) vRefNum);
  30984. æC 
  30985.  
  30986. æKY Allocate
  30987. æFc Files.h
  30988. æT Function
  30989. æD pascal OSErr Allocate(short refNum,long *count); 
  30990. æDT OSErr myVariable = Allocate((short) refNum,(long *) count);
  30991. æRI IV-143
  30992. æC  
  30993. [Not in ROM]
  30994.  
  30995. Allocate adds the number of bytes specified by the count parameter to the open file
  30996. whose access path is specified by refNum, and sets the physical end-of-file to one
  30997. byte beyond the last block allocated. The number of bytes actually allocated is
  30998. rounded up to the nearest multiple of the allocation block size, and returned in the
  30999. count parameter. If there isn’t enough empty space on the volume to satisfy the
  31000. allocation request, Allocate allocates the rest of the space on the volume and returns
  31001. dskFulErr as its function result.
  31002.  
  31003. Result codes    noErr        No error
  31004.                 dskFulErr    Disk full
  31005.                 fLckdErr     File locked
  31006.                 fnOpnErr     File not open
  31007.                 ioErr        I/O error
  31008.                 rfNumErr     Bad reference number
  31009.                 vLckdErr     Software volume lock
  31010.                 wPrErr       Hardware volume lock
  31011.                 wrPermErr    Read/write permission doesn’t allow writing
  31012.  
  31013. æKY GetEOF
  31014. æFc Files.h
  31015. æT Function
  31016. æD pascal OSErr GetEOF(short refNum,long *logEOF); 
  31017. æDT OSErr myVariable = GetEOF((short) refNum,(long *) logEOF);
  31018. æRI P-132, 172  high-level  II-93, IV-111 low-level  II-112, IV-142
  31019. æC  
  31020. [Not in ROM]
  31021.  
  31022. GetEOF returns, in logEOF, the logical end-of-file of the open file whose access path
  31023. is specified by refNum.
  31024.  
  31025. Result codes    noErr       No error
  31026.                 extFSErr    External file system
  31027.                 fnOpnErr    File not open
  31028.                 ioErr       I/O error
  31029.                 rfNumErr    Bad reference number
  31030.  
  31031. æKY SetEOF
  31032. æFc Files.h
  31033. æT Function
  31034. æD pascal OSErr SetEOF(short refNum,long logEOF); 
  31035. æDT OSErr myVariable = SetEOF((short) refNum,(long) logEOF);
  31036. æRI P-132, 180 high-level II-93, IV-111  low-level II-112, IV-142
  31037. æC  
  31038. [Not in ROM]
  31039.  
  31040. SetEOF sets the logical end-of-file of the open file whose access path is specified
  31041. by refNum to the position specified by logEOF. If you attempt to set the logical
  31042. end-of-file beyond the physical end-of-file, the physical end-of-file is set to one
  31043. byte beyond the end of the next free allocation block; if there isn’t enough space on
  31044. the volume, no change is made, and SetEOF returns dskFulErr as its function result.
  31045. If logEOF is 0, all space occupied by the file on the volume is released.
  31046.  
  31047. Result codes    noErr        No error
  31048.                 dskFulErr    Disk full
  31049.                 extFSErr     External file system
  31050.                 fLckdErr     File locked
  31051.                 fnOpnErr     File not open
  31052.                 ioErr        I/O error
  31053.                 rfNumErr     Bad reference number
  31054.                 vLckdErr     Software volume lock
  31055.                 wPrErr       Hardware volume lock
  31056.                 wrPermErr    Read/write permission doesn’t allow writing
  31057.  
  31058. æKY GetFPos
  31059. æFc Files.h
  31060. æT Function
  31061. æD pascal OSErr GetFPos(short refNum,long *filePos); 
  31062. æDT OSErr myVariable = GetFPos((short) refNum,(long *) filePos);
  31063. æRI II-92, IV-110  low-level  II-111, IV-141
  31064. æC  
  31065. [Not in ROM]
  31066.  
  31067. GetFPos returns, in filePos, the mark of the open file whose access path is specified
  31068. by refNum.
  31069.  
  31070. Result codes    noErr        No error
  31071.                 extFSErr     External file system
  31072.                 fnOpnErr     File not open
  31073.                 ioErr        I/O error
  31074.                 rfNumErr     Bad reference number
  31075.  
  31076. æKY SetFPos
  31077. æFc Files.h
  31078. æT Function
  31079. æD pascal OSErr SetFPos(short refNum,short posMode,long posOff); 
  31080. æDT OSErr myVariable = SetFPos((short) refNum,(short) posMode,(long) posOff);
  31081. æRI P-131, 132, 180  high-level II-93, IV-110 low-level II-111, IV-141
  31082. æC  
  31083. [Not in ROM]
  31084.  
  31085. SetFPos sets the mark of the open file whose access path is specified by refNum to
  31086. the position specified by posMode and posOff (except when posMode is equal to fsAtMark,
  31087. in which case posOff is ignored). PosMode indicates how to position the mark; it must
  31088. contain one of the following values:
  31089.  
  31090. CONST  fsAtMark     = 0;    {at current mark}
  31091.        fsFromStart  = 1;    {set mark relative to beginning of file}
  31092.        fsFromLEOF   = 2;    {set mark relative to logical end-of-file}
  31093.        fsFromMark   = 3;    {set mark relative to current mark}
  31094.  
  31095. If you specify fsAtMark, posOffset is ignored and the mark is left wherever
  31096. it’s currently positioned. If you choose to set the mark (relative to either the
  31097. beginning of the file, the logical end-of-file, or the current mark), posOffset
  31098. specifies the byte offset from the chosen point (either positive or negative) where
  31099. the mark should be set. If you try to set the mark past the logical end-of-file,
  31100. SetFPos moves the mark to the end-of-file and returns eofErr as its function result.
  31101.  
  31102. Result codes    noErr        No error
  31103.                 eofErr       End-of-file
  31104.                 extFSErr     External file system
  31105.                 fnOpnErr     File not open
  31106.                 ioErr        I/O error
  31107.                 posErr       Attempt to position before start of file
  31108.                 rfNumErr     Bad reference number
  31109.  
  31110. æKY GetVRefNum
  31111. æFc Files.h
  31112. æT Function
  31113. æD pascal OSErr GetVRefNum(short fileRefNum,short *vRefNum); 
  31114. æDT OSErr myVariable = GetVRefNum((short) fileRefNum,(short *) vRefNum);
  31115. æRI II-89, IV-107
  31116. æC  
  31117. [Not in ROM]
  31118.  
  31119. Given a path reference number in pathRefNum, GetVRefNum returns the volume reference
  31120. number in vRefNum.
  31121.  
  31122. Result codes    noErr       No error
  31123.                 rfNumErr    Bad reference number
  31124.  
  31125. æKY PBOpenWD
  31126. æFc Files.h
  31127. æT Function
  31128. æD pascal OSErr PBOpenWD(WDPBPtr paramBlock,Boolean async); 
  31129. æDT OSErr myVariable = PBOpenWD((WDPBPtr) paramBlock,(Boolean) async);
  31130. æRT 77, 190
  31131. æRI IV-158, N77-1
  31132. æC 
  31133. Trap macro    _OpenWD
  31134.  
  31135. Parameter block
  31136.   -->    12    ioCompletion  pointer
  31137.   <--    16    ioResult      word
  31138.   -->    18    ioNamePtr     pointer
  31139.   <->    22    ioVRefNum     word
  31140.   -->    28    ioWDProcID    long word
  31141.   -->    48    ioWDDirID     long word
  31142.  
  31143. PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and ioWDProcID and
  31144. makes it a working directory. (You can also specify the directory using a combination
  31145. of partial pathname and directory ID.) It returns a working directory reference
  31146. number in ioVRefNum that can be used in subsequent calls.
  31147.  
  31148. If a given directory has already been made a working directory using the same ioWDProcID,
  31149. no new working directory will be opened; instead, the existing working directory
  31150. reference number will be returned. If a given directory was already made a working
  31151. directory using a different ioWDProcID, a new working directory reference number is
  31152. returned.
  31153.  
  31154. Result codes    noErr       No error
  31155.                 tmwdoErr    Too many working directories open
  31156.  
  31157. æKY PBOpenWDSync
  31158. æFc Files.h
  31159. æT Function
  31160. æTN 7001,A260
  31161. æD #pragma parameter __D0 PBOpenWDSync(__A0)
  31162. pascal OSErr PBOpenWDSync(WDPBPtr paramBlock)
  31163.     = {0x7001,0xA260}; 
  31164. æDT #pragma parameter __D0 myVariable = PBOpenWDSync()(__A0);
  31165. æRT 77, 190
  31166. æRI IV-158, N77-1
  31167. æC 
  31168. Trap macro    _OpenWD
  31169.  
  31170. Parameter block
  31171.   -->    12    ioCompletion  pointer
  31172.   <--    16    ioResult      word
  31173.   -->    18    ioNamePtr     pointer
  31174.   <->    22    ioVRefNum     word
  31175.   -->    28    ioWDProcID    long word
  31176.   -->    48    ioWDDirID     long word
  31177.  
  31178. PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and ioWDProcID and
  31179. makes it a working directory. (You can also specify the directory using a combination
  31180. of partial pathname and directory ID.) It returns a working directory reference
  31181. number in ioVRefNum that can be used in subsequent calls.
  31182.  
  31183. If a given directory has already been made a working directory using the same ioWDProcID,
  31184. no new working directory will be opened; instead, the existing working directory
  31185. reference number will be returned. If a given directory was already made a working
  31186. directory using a different ioWDProcID, a new working directory reference number is
  31187. returned.
  31188.  
  31189. Result codes    noErr       No error
  31190.                 tmwdoErr    Too many working directories open
  31191.  
  31192. æKY PBOpenWDAsync
  31193. æFc Files.h
  31194. æT Function
  31195. æTN 7001,A660
  31196. æD #pragma parameter __D0 PBOpenWDAsync(__A0)
  31197. pascal OSErr PBOpenWDAsync(WDPBPtr paramBlock)
  31198.     = {0x7001,0xA660}; 
  31199. æDT #pragma parameter __D0 myVariable = PBOpenWDAsync()(__A0);
  31200. æRT 77, 190
  31201. æRI IV-158, N77-1
  31202. æC 
  31203. Trap macro    _OpenWD
  31204.  
  31205. Parameter block
  31206.   -->    12    ioCompletion  pointer
  31207.   <--    16    ioResult      word
  31208.   -->    18    ioNamePtr     pointer
  31209.   <->    22    ioVRefNum     word
  31210.   -->    28    ioWDProcID    long word
  31211.   -->    48    ioWDDirID     long word
  31212.  
  31213. PBOpenWD takes the directory specified by ioVRefNum, ioWDDirID, and ioWDProcID and
  31214. makes it a working directory. (You can also specify the directory using a combination
  31215. of partial pathname and directory ID.) It returns a working directory reference
  31216. number in ioVRefNum that can be used in subsequent calls.
  31217.  
  31218. If a given directory has already been made a working directory using the same ioWDProcID,
  31219. no new working directory will be opened; instead, the existing working directory
  31220. reference number will be returned. If a given directory was already made a working
  31221. directory using a different ioWDProcID, a new working directory reference number is
  31222. returned.
  31223.  
  31224. Result codes    noErr       No error
  31225.                 tmwdoErr    Too many working directories open
  31226.  
  31227. æKY PBCloseWD
  31228. æFc Files.h
  31229. æT Function
  31230. æD pascal OSErr PBCloseWD(WDPBPtr paramBlock,Boolean async); 
  31231. æDT OSErr myVariable = PBCloseWD((WDPBPtr) paramBlock,(Boolean) async);
  31232. æRI IV-158      
  31233. æC 
  31234. Trap macro    _CloseWD
  31235.  
  31236. Parameter block
  31237.   -->    12    ioCompletion  pointer
  31238.   <--    16    ioResult      word
  31239.   -->    22    ioVRefNum     word
  31240.  
  31241. PBCloseWD releases the working directory whose working directory reference number is
  31242. specified in ioVRefNum.
  31243.  
  31244. Note:  If a volume reference number is specified in ioVRefNum, PBCloseWD
  31245.        does nothing.
  31246.  
  31247. Result codes    noErr     No error
  31248.                 nsvErr    No such volume
  31249.  
  31250. æKY PBCloseWDSync
  31251. æFc Files.h
  31252. æT Function
  31253. æTN 7002,A260
  31254. æD #pragma parameter __D0 PBCloseWDSync(__A0)
  31255. pascal OSErr PBCloseWDSync(WDPBPtr paramBlock)
  31256.     = {0x7002,0xA260}; 
  31257. æDT #pragma parameter __D0 myVariable = PBCloseWDSync()(__A0);
  31258. æRI IV-158      
  31259. æC 
  31260. Trap macro    _CloseWD
  31261.  
  31262. Parameter block
  31263.   -->    12    ioCompletion  pointer
  31264.   <--    16    ioResult      word
  31265.   -->    22    ioVRefNum     word
  31266.  
  31267. PBCloseWD releases the working directory whose working directory reference number is
  31268. specified in ioVRefNum.
  31269.  
  31270. Note:  If a volume reference number is specified in ioVRefNum, PBCloseWD
  31271.        does nothing.
  31272.  
  31273. Result codes    noErr     No error
  31274.                 nsvErr    No such volume
  31275.  
  31276. æKY PBCloseWDAsync
  31277. æFc Files.h
  31278. æT Function
  31279. æTN 7002,A660
  31280. æD #pragma parameter __D0 PBCloseWDAsync(__A0)
  31281. pascal OSErr PBCloseWDAsync(WDPBPtr paramBlock)
  31282.     = {0x7002,0xA660}; 
  31283. æDT #pragma parameter __D0 myVariable = PBCloseWDAsync()(__A0);
  31284. æRI IV-158      
  31285. æC 
  31286. Trap macro    _CloseWD
  31287.  
  31288. Parameter block
  31289.   -->    12    ioCompletion  pointer
  31290.   <--    16    ioResult      word
  31291.   -->    22    ioVRefNum     word
  31292.  
  31293. PBCloseWD releases the working directory whose working directory reference number is
  31294. specified in ioVRefNum.
  31295.  
  31296. Note:  If a volume reference number is specified in ioVRefNum, PBCloseWD
  31297.        does nothing.
  31298.  
  31299. Result codes    noErr     No error
  31300.                 nsvErr    No such volume
  31301.  
  31302. æKY PBHSetVol
  31303. æFc Files.h
  31304. æT Function
  31305. æD pascal OSErr PBHSetVol(WDPBPtr paramBlock,Boolean async); 
  31306. æDT OSErr myVariable = PBHSetVol((WDPBPtr) paramBlock,(Boolean) async);
  31307. æRT 140
  31308. æRI IV-133, N140
  31309. æC 
  31310. •••Refer to Technical Note #140:•••
  31311.  
  31312. Trap macro    _HSetVol
  31313.  
  31314. Parameter block
  31315.   -->    12    ioCompletion  pointer
  31316.   <--    16    ioResult      word
  31317.   -->    18    ioNamePtr     pointer
  31318.   -->    22    ioVRefNum     word
  31319.   -->    48    ioWDDirID     long word
  31320.  
  31321. PBHSetVol sets both the default volume and the default directory. The default directory
  31322. to be used can be specified by either a volume reference number or a working directory
  31323. reference number in ioVRefNum, a directory ID in ioWDDirID, or a pointer to a pathname
  31324. (possibly NIL) in ioNamePtr.
  31325.  
  31326. Note:  Both the default volume and the default directory are used in
  31327.        calls made with no volume name and a volume reference number of zero.
  31328.  
  31329. Result codes    noErr     No error
  31330.                 nsvErr    No default volume
  31331.  
  31332. æKY PBHSetVolSync
  31333. æFc Files.h
  31334. æT Function
  31335. æTN A215
  31336. æD #pragma parameter __D0 PBHSetVolSync(__A0)
  31337. pascal OSErr PBHSetVolSync(WDPBPtr paramBlock)
  31338.     = 0xA215; 
  31339. æDT #pragma parameter __D0 myVariable = PBHSetVolSync()(__A0);
  31340. æRT 140
  31341. æRI IV-133, N140
  31342. æC 
  31343. •••Refer to Technical Note #140:•••
  31344.  
  31345. Trap macro    _HSetVol
  31346.  
  31347. Parameter block
  31348.   -->    12    ioCompletion  pointer
  31349.   <--    16    ioResult      word
  31350.   -->    18    ioNamePtr     pointer
  31351.   -->    22    ioVRefNum     word
  31352.   -->    48    ioWDDirID     long word
  31353.  
  31354. PBHSetVol sets both the default volume and the default directory. The default directory
  31355. to be used can be specified by either a volume reference number or a working directory
  31356. reference number in ioVRefNum, a directory ID in ioWDDirID, or a pointer to a pathname
  31357. (possibly NIL) in ioNamePtr.
  31358.  
  31359. Note:  Both the default volume and the default directory are used in
  31360.        calls made with no volume name and a volume reference number of zero.
  31361.  
  31362. Result codes    noErr     No error
  31363.                 nsvErr    No default volume
  31364.  
  31365. æKY PBHSetVolAsync
  31366. æFc Files.h
  31367. æT Function
  31368. æTN A615
  31369. æD #pragma parameter __D0 PBHSetVolAsync(__A0)
  31370. pascal OSErr PBHSetVolAsync(WDPBPtr paramBlock)
  31371.     = 0xA615; 
  31372. æDT #pragma parameter __D0 myVariable = PBHSetVolAsync()(__A0);
  31373. æRT 140
  31374. æRI IV-133, N140
  31375. æC 
  31376. •••Refer to Technical Note #140:•••
  31377.  
  31378. Trap macro    _HSetVol
  31379.  
  31380. Parameter block
  31381.   -->    12    ioCompletion  pointer
  31382.   <--    16    ioResult      word
  31383.   -->    18    ioNamePtr     pointer
  31384.   -->    22    ioVRefNum     word
  31385.   -->    48    ioWDDirID     long word
  31386.  
  31387. PBHSetVol sets both the default volume and the default directory. The default directory
  31388. to be used can be specified by either a volume reference number or a working directory
  31389. reference number in ioVRefNum, a directory ID in ioWDDirID, or a pointer to a pathname
  31390. (possibly NIL) in ioNamePtr.
  31391.  
  31392. Note:  Both the default volume and the default directory are used in
  31393.        calls made with no volume name and a volume reference number of zero.
  31394.  
  31395. Result codes    noErr     No error
  31396.                 nsvErr    No default volume
  31397.  
  31398. æKY PBHGetVol
  31399. æFc Files.h
  31400. æT Function
  31401. æD pascal OSErr PBHGetVol(WDPBPtr paramBlock,Boolean async); 
  31402. æDT OSErr myVariable = PBHGetVol((WDPBPtr) paramBlock,(Boolean) async);
  31403. æRI IV-132 
  31404. æC 
  31405. Trap macro    _HGetVol
  31406.  
  31407. Parameter block
  31408.   -->    12    ioCompletion  pointer
  31409.   <--    16    ioResult      word
  31410.   <--    18    ioNamePtr     pointer
  31411.   <--    22    ioVRefNum     word
  31412.   <--    28    ioWDProcID    long word
  31413.   <--    32    ioWDVRefNum   word
  31414.   <--    48    ioWDDirID     long word
  31415.  
  31416. PBHGetVol returns the default volume and directory last set by either a PBSetVol or a
  31417. PBHSetVol call. The reference number of the default volume is returned in ioVRefNum.
  31418.  
  31419. Warning:  IOVRefNum will return a working directory reference number
  31420.           (instead of the volume reference number) if, in the last call
  31421.           to PBSetVol or PBHSetVol, a working directory reference number
  31422.           was passed in this field.
  31423.  
  31424. The volume reference number of the volume on which the default directory exists is
  31425. returned in ioWDVRefNum. The directory ID of the default directory is returned in
  31426. ioWDDirID.
  31427.  
  31428. Result codes    noErr     No error
  31429.                 nsvErr    No default volume
  31430.  
  31431. æKY PBHGetVolSync
  31432. æFc Files.h
  31433. æT Function
  31434. æTN A214
  31435. æD #pragma parameter __D0 PBHGetVolSync(__A0)
  31436. pascal OSErr PBHGetVolSync(WDPBPtr paramBlock)
  31437.     = 0xA214; 
  31438. æDT #pragma parameter __D0 myVariable = PBHGetVolSync()(__A0);
  31439. æRI IV-132 
  31440. æC 
  31441. Trap macro    _HGetVol
  31442.  
  31443. Parameter block
  31444.   -->    12    ioCompletion  pointer
  31445.   <--    16    ioResult      word
  31446.   <--    18    ioNamePtr     pointer
  31447.   <--    22    ioVRefNum     word
  31448.   <--    28    ioWDProcID    long word
  31449.   <--    32    ioWDVRefNum   word
  31450.   <--    48    ioWDDirID     long word
  31451.  
  31452. PBHGetVol returns the default volume and directory last set by either a PBSetVol or a
  31453. PBHSetVol call. The reference number of the default volume is returned in ioVRefNum.
  31454.  
  31455. Warning:  IOVRefNum will return a working directory reference number
  31456.           (instead of the volume reference number) if, in the last call
  31457.           to PBSetVol or PBHSetVol, a working directory reference number
  31458.           was passed in this field.
  31459.  
  31460. The volume reference number of the volume on which the default directory exists is
  31461. returned in ioWDVRefNum. The directory ID of the default directory is returned in
  31462. ioWDDirID.
  31463.  
  31464. Result codes    noErr     No error
  31465.                 nsvErr    No default volume
  31466.  
  31467. æKY PBHGetVolAsync
  31468. æFc Files.h
  31469. æT Function
  31470. æTN A614
  31471. æD #pragma parameter __D0 PBHGetVolAsync(__A0)
  31472. pascal OSErr PBHGetVolAsync(WDPBPtr paramBlock)
  31473.     = 0xA614; 
  31474. æDT #pragma parameter __D0 myVariable = PBHGetVolAsync()(__A0);
  31475. æRI IV-132 
  31476. æC 
  31477. Trap macro    _HGetVol
  31478.  
  31479. Parameter block
  31480.   -->    12    ioCompletion  pointer
  31481.   <--    16    ioResult      word
  31482.   <--    18    ioNamePtr     pointer
  31483.   <--    22    ioVRefNum     word
  31484.   <--    28    ioWDProcID    long word
  31485.   <--    32    ioWDVRefNum   word
  31486.   <--    48    ioWDDirID     long word
  31487.  
  31488. PBHGetVol returns the default volume and directory last set by either a PBSetVol or a
  31489. PBHSetVol call. The reference number of the default volume is returned in ioVRefNum.
  31490.  
  31491. Warning:  IOVRefNum will return a working directory reference number
  31492.           (instead of the volume reference number) if, in the last call
  31493.           to PBSetVol or PBHSetVol, a working directory reference number
  31494.           was passed in this field.
  31495.  
  31496. The volume reference number of the volume on which the default directory exists is
  31497. returned in ioWDVRefNum. The directory ID of the default directory is returned in
  31498. ioWDDirID.
  31499.  
  31500. Result codes    noErr     No error
  31501.                 nsvErr    No default volume
  31502.  
  31503. æKY PBCatMove
  31504. æFc Files.h
  31505. æT Function
  31506. æD pascal OSErr PBCatMove(CMovePBPtr paramBlock,Boolean async); 
  31507. æDT OSErr myVariable = PBCatMove((CMovePBPtr) paramBlock,(Boolean) async);
  31508. æRI IV-157
  31509. æC 
  31510. •••Refer to Technical Note #226:•••
  31511.  
  31512. Trap macro    _CatMove
  31513.  
  31514. Parameter block
  31515.   -->    12    ioCompletion  pointer
  31516.   <--    16    ioResult      word
  31517.   -->    18    ioNamePtr     pointer
  31518.   -->    22    ioVRefNum     word
  31519.   -->    28    ioNewName     pointer
  31520.   -->    36    ioNewDirID    long word
  31521.   -->    48    ioDirID       long word
  31522.  
  31523. PBCatMove moves files or directories from one directory to another. The name of the
  31524. file or directory to be moved is pointed to by ioNamePtr; ioVRefNum contains either
  31525. the volume reference number or working directory reference number. A directory ID can
  31526. be specified in ioDirID. The name and directory ID of the directory to which the file
  31527. or directory is to be moved are specified by ioNewName and ioNewDirID.
  31528.  
  31529. PBCatMove is strictly a file catalog operation; it does not actually change the
  31530. location of the file or directory on the disk. PBCatMove cannot move a file or directory
  31531. to another volume (that is, ioVRefNum is used in specifying both the source and the
  31532. destination). It also cannot be used to rename files or directories; for that, use
  31533. PBHRename.
  31534.  
  31535. Result codes    noErr      No error
  31536.                 badMovErr  Attempt to move into offspring
  31537.                 bdNamErr   Bad file name or attempt to move into a file
  31538.                 dupFNErr   Duplicate file name and version
  31539.                 fnfErr     File not found
  31540.                 ioErr      I/O error
  31541.                 nsvErr     No such volume
  31542.                 paramErr   No default volume
  31543.                 vLckdErr   Software volume lock
  31544.                 wPrErr     Hardware volume lock
  31545.  
  31546. æKY PBCatMoveSync
  31547. æFc Files.h
  31548. æT Function
  31549. æTN 7005,A260
  31550. æD #pragma parameter __D0 PBCatMoveSync(__A0)
  31551. pascal OSErr PBCatMoveSync(CMovePBPtr paramBlock)
  31552.     = {0x7005,0xA260}; 
  31553. æDT #pragma parameter __D0 myVariable = PBCatMoveSync()(__A0);
  31554. æRI IV-157
  31555. æC 
  31556. •••Refer to Technical Note #226:•••
  31557.  
  31558. Trap macro    _CatMove
  31559.  
  31560. Parameter block
  31561.   -->    12    ioCompletion  pointer
  31562.   <--    16    ioResult      word
  31563.   -->    18    ioNamePtr     pointer
  31564.   -->    22    ioVRefNum     word
  31565.   -->    28    ioNewName     pointer
  31566.   -->    36    ioNewDirID    long word
  31567.   -->    48    ioDirID       long word
  31568.  
  31569. PBCatMove moves files or directories from one directory to another. The name of the
  31570. file or directory to be moved is pointed to by ioNamePtr; ioVRefNum contains either
  31571. the volume reference number or working directory reference number. A directory ID can
  31572. be specified in ioDirID. The name and directory ID of the directory to which the file
  31573. or directory is to be moved are specified by ioNewName and ioNewDirID.
  31574.  
  31575. PBCatMove is strictly a file catalog operation; it does not actually change the
  31576. location of the file or directory on the disk. PBCatMove cannot move a file or directory
  31577. to another volume (that is, ioVRefNum is used in specifying both the source and the
  31578. destination). It also cannot be used to rename files or directories; for that, use
  31579. PBHRename.
  31580.  
  31581. Result codes    noErr      No error
  31582.                 badMovErr  Attempt to move into offspring
  31583.                 bdNamErr   Bad file name or attempt to move into a file
  31584.                 dupFNErr   Duplicate file name and version
  31585.                 fnfErr     File not found
  31586.                 ioErr      I/O error
  31587.                 nsvErr     No such volume
  31588.                 paramErr   No default volume
  31589.                 vLckdErr   Software volume lock
  31590.                 wPrErr     Hardware volume lock
  31591.  
  31592. æKY PBCatMoveAsync
  31593. æFc Files.h
  31594. æT Function
  31595. æTN 7005,A660
  31596. æD #pragma parameter __D0 PBCatMoveAsync(__A0)
  31597. pascal OSErr PBCatMoveAsync(CMovePBPtr paramBlock)
  31598.     = {0x7005,0xA660}; 
  31599. æDT #pragma parameter __D0 myVariable = PBCatMoveAsync()(__A0);
  31600. æRI IV-157
  31601. æC 
  31602. •••Refer to Technical Note #226:•••
  31603.  
  31604. Trap macro    _CatMove
  31605.  
  31606. Parameter block
  31607.   -->    12    ioCompletion  pointer
  31608.   <--    16    ioResult      word
  31609.   -->    18    ioNamePtr     pointer
  31610.   -->    22    ioVRefNum     word
  31611.   -->    28    ioNewName     pointer
  31612.   -->    36    ioNewDirID    long word
  31613.   -->    48    ioDirID       long word
  31614.  
  31615. PBCatMove moves files or directories from one directory to another. The name of the
  31616. file or directory to be moved is pointed to by ioNamePtr; ioVRefNum contains either
  31617. the volume reference number or working directory reference number. A directory ID can
  31618. be specified in ioDirID. The name and directory ID of the directory to which the file
  31619. or directory is to be moved are specified by ioNewName and ioNewDirID.
  31620.  
  31621. PBCatMove is strictly a file catalog operation; it does not actually change the
  31622. location of the file or directory on the disk. PBCatMove cannot move a file or directory
  31623. to another volume (that is, ioVRefNum is used in specifying both the source and the
  31624. destination). It also cannot be used to rename files or directories; for that, use
  31625. PBHRename.
  31626.  
  31627. Result codes    noErr      No error
  31628.                 badMovErr  Attempt to move into offspring
  31629.                 bdNamErr   Bad file name or attempt to move into a file
  31630.                 dupFNErr   Duplicate file name and version
  31631.                 fnfErr     File not found
  31632.                 ioErr      I/O error
  31633.                 nsvErr     No such volume
  31634.                 paramErr   No default volume
  31635.                 vLckdErr   Software volume lock
  31636.                 wPrErr     Hardware volume lock
  31637.  
  31638. æKY PBDirCreate
  31639. æFc Files.h
  31640. æT Function
  31641. æD pascal OSErr PBDirCreate(HParmBlkPtr paramBlock,Boolean async); 
  31642. æDT OSErr myVariable = PBDirCreate((HParmBlkPtr) paramBlock,(Boolean) async);
  31643. æRI IV-146
  31644. æC 
  31645. Trap macro    _DirCreate
  31646.  
  31647. Parameter block
  31648.   -->    12    ioCompletion  pointer
  31649.   <--    16    ioResult      word
  31650.   <->    18    ioNamePtr     pointer
  31651.   -->    22    ioVRefNum     word
  31652.   <->    48    ioDirID       long word
  31653.  
  31654. PBDirCreate is identical to PBHCreate except that it creates a new directory instead
  31655. of a file. You can specify the parent of the directory to be created in ioDirID; if
  31656. it’s 0, the new directory will be placed in the root directory. The directory ID of
  31657. the new directory is returned in ioDirID.
  31658.  
  31659. Warning:  PBDirCreate operates only with the hierarchical version of
  31660.           the File Manager; if used on a Macintosh equipped only with
  31661.           the 64K ROM version of the File Manager, it will generate a
  31662.           system error.
  31663.  
  31664. Result codes    noErr      No error
  31665.                 bdNamErr   Bad file name
  31666.                 dupFNErr   Duplicate file name and version
  31667.                 dirFulErr  File directory full
  31668.                 dirNFErr   Directory not found or incomplete pathname
  31669.                 extFSErr   External file system
  31670.                 ioErr      I/O error
  31671.                 nsvErr     No such volume
  31672.                 vLckdErr   Software volume lock
  31673.                 wPrErr     Hardware volume lock
  31674.     
  31675.  
  31676. æKY PBDirCreateSync
  31677. æFc Files.h
  31678. æT Function
  31679. æTN 7006,A260
  31680. æD #pragma parameter __D0 PBDirCreateSync(__A0)
  31681. pascal OSErr PBDirCreateSync(HParmBlkPtr paramBlock)
  31682.     = {0x7006,0xA260}; 
  31683. æDT #pragma parameter __D0 myVariable = PBDirCreateSync()(__A0);
  31684. æRI IV-146
  31685. æC 
  31686. Trap macro    _DirCreate
  31687.  
  31688. Parameter block
  31689.   -->    12    ioCompletion  pointer
  31690.   <--    16    ioResult      word
  31691.   <->    18    ioNamePtr     pointer
  31692.   -->    22    ioVRefNum     word
  31693.   <->    48    ioDirID       long word
  31694.  
  31695. PBDirCreate is identical to PBHCreate except that it creates a new directory instead
  31696. of a file. You can specify the parent of the directory to be created in ioDirID; if
  31697. it’s 0, the new directory will be placed in the root directory. The directory ID of
  31698. the new directory is returned in ioDirID.
  31699.  
  31700. Warning:  PBDirCreate operates only with the hierarchical version of
  31701.           the File Manager; if used on a Macintosh equipped only with
  31702.           the 64K ROM version of the File Manager, it will generate a
  31703.           system error.
  31704.  
  31705. Result codes    noErr      No error
  31706.                 bdNamErr   Bad file name
  31707.                 dupFNErr   Duplicate file name and version
  31708.                 dirFulErr  File directory full
  31709.                 dirNFErr   Directory not found or incomplete pathname
  31710.                 extFSErr   External file system
  31711.                 ioErr      I/O error
  31712.                 nsvErr     No such volume
  31713.                 vLckdErr   Software volume lock
  31714.                 wPrErr     Hardware volume lock
  31715.     
  31716.  
  31717. æKY PBDirCreateAsync
  31718. æFc Files.h
  31719. æT Function
  31720. æTN 7006,A660
  31721. æD #pragma parameter __D0 PBDirCreateAsync(__A0)
  31722. pascal OSErr PBDirCreateAsync(HParmBlkPtr paramBlock)
  31723.     = {0x7006,0xA660}; 
  31724. æDT #pragma parameter __D0 myVariable = PBDirCreateAsync()(__A0);
  31725. æRI IV-146
  31726. æC 
  31727. Trap macro    _DirCreate
  31728.  
  31729. Parameter block
  31730.   -->    12    ioCompletion  pointer
  31731.   <--    16    ioResult      word
  31732.   <->    18    ioNamePtr     pointer
  31733.   -->    22    ioVRefNum     word
  31734.   <->    48    ioDirID       long word
  31735.  
  31736. PBDirCreate is identical to PBHCreate except that it creates a new directory instead
  31737. of a file. You can specify the parent of the directory to be created in ioDirID; if
  31738. it’s 0, the new directory will be placed in the root directory. The directory ID of
  31739. the new directory is returned in ioDirID.
  31740.  
  31741. Warning:  PBDirCreate operates only with the hierarchical version of
  31742.           the File Manager; if used on a Macintosh equipped only with
  31743.           the 64K ROM version of the File Manager, it will generate a
  31744.           system error.
  31745.  
  31746. Result codes    noErr      No error
  31747.                 bdNamErr   Bad file name
  31748.                 dupFNErr   Duplicate file name and version
  31749.                 dirFulErr  File directory full
  31750.                 dirNFErr   Directory not found or incomplete pathname
  31751.                 extFSErr   External file system
  31752.                 ioErr      I/O error
  31753.                 nsvErr     No such volume
  31754.                 vLckdErr   Software volume lock
  31755.                 wPrErr     Hardware volume lock
  31756.     
  31757.  
  31758. æKY PBGetWDInfo
  31759. æFc Files.h
  31760. æT Function
  31761. æD pascal OSErr PBGetWDInfo(WDPBPtr paramBlock,Boolean async); 
  31762. æDT OSErr myVariable = PBGetWDInfo((WDPBPtr) paramBlock,(Boolean) async);
  31763. æRT 77, 190
  31764. æRI IV-159, N77-5
  31765. æC 
  31766. Trap macro    _GetWDInfo
  31767.  
  31768. Parameter block
  31769.   -->    12    ioCompletion  pointer
  31770.   <--    16    ioResult      word
  31771.   <--    18    ioNamePtr     pointer
  31772.   <->    22    ioVRefNum     word
  31773.   -->    26    ioWDIndex     word
  31774.   <->    28    ioWDProcID    long word
  31775.   <->    32    ioWDVRefNum   word
  31776.   <--    48    ioWDDirID     long word
  31777.  
  31778. PBGetWDInfo returns information about the specified working directory. The working
  31779. directory can be specified either by its working directory reference number in ioVRefNum
  31780. (in which case ioWDIndex should be 0), or by its index number in ioWDIndex. In the
  31781. latter case, if ioVRefNum is nonzero, it’s interpreted as a volume specification
  31782. (volume reference number or drive number), and only working directories on that
  31783. volume are indexed.
  31784.  
  31785. IOWDVRefNum always returns the volume reference number. IOVRefNum returns a working
  31786. directory reference number when a working directory reference number is passed in
  31787. that field; otherwise, it returns a volume reference number. The volume name is
  31788. returned in ioNamePtr.
  31789.  
  31790. If IOWDProcID is nonzero, only working directories with that identifier are indexed;
  31791. otherwise all working directories are indexed.
  31792.  
  31793. Result codes    noErr     No error
  31794.                 nsvErr    No such volume
  31795.  
  31796. æKY PBGetWDInfoSync
  31797. æFc Files.h
  31798. æT Function
  31799. æTN 7007,A260
  31800. æD #pragma parameter __D0 PBGetWDInfoSync(__A0)
  31801. pascal OSErr PBGetWDInfoSync(WDPBPtr paramBlock)
  31802.     = {0x7007,0xA260}; 
  31803. æDT #pragma parameter __D0 myVariable = PBGetWDInfoSync()(__A0);
  31804. æRT 77, 190
  31805. æRI IV-159, N77-5
  31806. æC 
  31807. Trap macro    _GetWDInfo
  31808.  
  31809. Parameter block
  31810.   -->    12    ioCompletion  pointer
  31811.   <--    16    ioResult      word
  31812.   <--    18    ioNamePtr     pointer
  31813.   <->    22    ioVRefNum     word
  31814.   -->    26    ioWDIndex     word
  31815.   <->    28    ioWDProcID    long word
  31816.   <->    32    ioWDVRefNum   word
  31817.   <--    48    ioWDDirID     long word
  31818.  
  31819. PBGetWDInfo returns information about the specified working directory. The working
  31820. directory can be specified either by its working directory reference number in ioVRefNum
  31821. (in which case ioWDIndex should be 0), or by its index number in ioWDIndex. In the
  31822. latter case, if ioVRefNum is nonzero, it’s interpreted as a volume specification
  31823. (volume reference number or drive number), and only working directories on that
  31824. volume are indexed.
  31825.  
  31826. IOWDVRefNum always returns the volume reference number. IOVRefNum returns a working
  31827. directory reference number when a working directory reference number is passed in
  31828. that field; otherwise, it returns a volume reference number. The volume name is
  31829. returned in ioNamePtr.
  31830.  
  31831. If IOWDProcID is nonzero, only working directories with that identifier are indexed;
  31832. otherwise all working directories are indexed.
  31833.  
  31834. Result codes    noErr     No error
  31835.                 nsvErr    No such volume
  31836.  
  31837. æKY PBGetWDInfoAsync
  31838. æFc Files.h
  31839. æT Function
  31840. æTN 7007,A660
  31841. æD #pragma parameter __D0 PBGetWDInfoAsync(__A0)
  31842. pascal OSErr PBGetWDInfoAsync(WDPBPtr paramBlock)
  31843.     = {0x7007,0xA660}; 
  31844. æDT #pragma parameter __D0 myVariable = PBGetWDInfoAsync()(__A0);
  31845. æRT 77, 190
  31846. æRI IV-159, N77-5
  31847. æC 
  31848. Trap macro    _GetWDInfo
  31849.  
  31850. Parameter block
  31851.   -->    12    ioCompletion  pointer
  31852.   <--    16    ioResult      word
  31853.   <--    18    ioNamePtr     pointer
  31854.   <->    22    ioVRefNum     word
  31855.   -->    26    ioWDIndex     word
  31856.   <->    28    ioWDProcID    long word
  31857.   <->    32    ioWDVRefNum   word
  31858.   <--    48    ioWDDirID     long word
  31859.  
  31860. PBGetWDInfo returns information about the specified working directory. The working
  31861. directory can be specified either by its working directory reference number in ioVRefNum
  31862. (in which case ioWDIndex should be 0), or by its index number in ioWDIndex. In the
  31863. latter case, if ioVRefNum is nonzero, it’s interpreted as a volume specification
  31864. (volume reference number or drive number), and only working directories on that
  31865. volume are indexed.
  31866.  
  31867. IOWDVRefNum always returns the volume reference number. IOVRefNum returns a working
  31868. directory reference number when a working directory reference number is passed in
  31869. that field; otherwise, it returns a volume reference number. The volume name is
  31870. returned in ioNamePtr.
  31871.  
  31872. If IOWDProcID is nonzero, only working directories with that identifier are indexed;
  31873. otherwise all working directories are indexed.
  31874.  
  31875. Result codes    noErr     No error
  31876.                 nsvErr    No such volume
  31877.  
  31878. æKY PBGetFCBInfo
  31879. æFc Files.h
  31880. æT Function
  31881. æD pascal OSErr PBGetFCBInfo(FCBPBPtr paramBlock,Boolean async); 
  31882. æDT OSErr myVariable = PBGetFCBInfo((FCBPBPtr) paramBlock,(Boolean) async);
  31883. æRT 87
  31884. æRI IV-179, N87-1
  31885. æC  
  31886. Trap macro    _GetFCBInfo
  31887.  
  31888. Parameter block
  31889.   -->    12    ioCompletion  pointer
  31890.   <--    16    ioResult      word
  31891.   <--    18    ioNamePtr     pointer
  31892.   <->    22    ioVRefNum     word
  31893.   <->    24    ioRefNum      word
  31894.   -->    28    ioFCBIndx     long word
  31895.   <--    32    ioFCBFlNm     long word
  31896.   <--    36    ioFCBFlags    word
  31897.   <--    38    ioFCBStBlk    word
  31898.   <--    40    ioFCBEOF      long word
  31899.   <--    44    ioFCBPLen     long word
  31900.   <--    48    ioFCBCrPs     long word
  31901.   <--    52    ioFCBVRefNum  word
  31902.   <--    54    ioFCBClpSiz   long word
  31903.   <--    58    ioFCBParID    long word
  31904.  
  31905. PBGetFCBInfo returns information about the specified open file. If ioFCBIndx is
  31906. positive, the File Manager returns information about the file whose file number is
  31907. ioFCBIndx on the volume specified by ioVRefNum (which may contain a drive number,
  31908. volume reference number, or working directory reference number). If ioVRefNum is 0,
  31909. all open files are indexed; otherwise, only open files on the specified volume are
  31910. indexed.
  31911.  
  31912. If ioFCBIndx is 0, the File Manager returns information about the file whose access
  31913. path is specified by ioRefNum.
  31914.  
  31915. Assembly-language note:  The global variable FCBSPtr points to the
  31916.                          length word of the file-control-block buffer.
  31917.  
  31918. Each file control block contains 94 bytes of information about an access path; Figure
  31919. 28 shows its structure (using the assembly-language offsets).
  31920.  
  31921. •••Refer to Figure 28.•••
  31922.  
  31923. Figure 28–A File Control Block
  31924.  
  31925. 64K ROM note:  The structure of a file control block in the 64K ROM
  31926.                version of the File Manager is a subset of the above
  31927.                structure. The old file control block contained only
  31928.                the fields up to and including fcbFlPos.
  31929.  
  31930. FCBMdRByt (which corresponds to ioFCBFlags in the parameter block for PBGetFCBInfo)
  31931. contains flags that describe the status of the file, as follows:
  31932.  
  31933.   Bit    Meaning
  31934.   0     Set if data can be written to the file
  31935.   1     Set if the entry describes a resource fork
  31936.   7     Set if the file has been changed since it was last flushed
  31937.  
  31938. Warning:  The size and structure of a file control block may be
  31939.           different in future versions of Macintosh system software.
  31940.  
  31941. æKY PBGetFCBInfoSync
  31942. æFc Files.h
  31943. æT Function
  31944. æTN 7008,A260
  31945. æD #pragma parameter __D0 PBGetFCBInfoSync(__A0)
  31946. pascal OSErr PBGetFCBInfoSync(FCBPBPtr paramBlock)
  31947.     = {0x7008,0xA260}; 
  31948. æDT #pragma parameter __D0 myVariable = PBGetFCBInfoSync()(__A0);
  31949. æRT 87
  31950. æRI IV-179, N87-1
  31951. æC  
  31952. Trap macro    _GetFCBInfo
  31953.  
  31954. Parameter block
  31955.   -->    12    ioCompletion  pointer
  31956.   <--    16    ioResult      word
  31957.   <--    18    ioNamePtr     pointer
  31958.   <->    22    ioVRefNum     word
  31959.   <->    24    ioRefNum      word
  31960.   -->    28    ioFCBIndx     long word
  31961.   <--    32    ioFCBFlNm     long word
  31962.   <--    36    ioFCBFlags    word
  31963.   <--    38    ioFCBStBlk    word
  31964.   <--    40    ioFCBEOF      long word
  31965.   <--    44    ioFCBPLen     long word
  31966.   <--    48    ioFCBCrPs     long word
  31967.   <--    52    ioFCBVRefNum  word
  31968.   <--    54    ioFCBClpSiz   long word
  31969.   <--    58    ioFCBParID    long word
  31970.  
  31971. PBGetFCBInfo returns information about the specified open file. If ioFCBIndx is
  31972. positive, the File Manager returns information about the file whose file number is
  31973. ioFCBIndx on the volume specified by ioVRefNum (which may contain a drive number,
  31974. volume reference number, or working directory reference number). If ioVRefNum is 0,
  31975. all open files are indexed; otherwise, only open files on the specified volume are
  31976. indexed.
  31977.  
  31978. If ioFCBIndx is 0, the File Manager returns information about the file whose access
  31979. path is specified by ioRefNum.
  31980.  
  31981. Assembly-language note:  The global variable FCBSPtr points to the
  31982.                          length word of the file-control-block buffer.
  31983.  
  31984. Each file control block contains 94 bytes of information about an access path; Figure
  31985. 28 shows its structure (using the assembly-language offsets).
  31986.  
  31987. •••Refer to Figure 28.•••
  31988.  
  31989. Figure 28–A File Control Block
  31990.  
  31991. 64K ROM note:  The structure of a file control block in the 64K ROM
  31992.                version of the File Manager is a subset of the above
  31993.                structure. The old file control block contained only
  31994.                the fields up to and including fcbFlPos.
  31995.  
  31996. FCBMdRByt (which corresponds to ioFCBFlags in the parameter block for PBGetFCBInfo)
  31997. contains flags that describe the status of the file, as follows:
  31998.  
  31999.   Bit    Meaning
  32000.   0     Set if data can be written to the file
  32001.   1     Set if the entry describes a resource fork
  32002.   7     Set if the file has been changed since it was last flushed
  32003.  
  32004. Warning:  The size and structure of a file control block may be
  32005.           different in future versions of Macintosh system software.
  32006.  
  32007. æKY PBGetFCBInfoAsync
  32008. æFc Files.h
  32009. æT Function
  32010. æTN 7008,A660
  32011. æD #pragma parameter __D0 PBGetFCBInfoAsync(__A0)
  32012. pascal OSErr PBGetFCBInfoAsync(FCBPBPtr paramBlock)
  32013.     = {0x7008,0xA660}; 
  32014. æDT #pragma parameter __D0 myVariable = PBGetFCBInfoAsync()(__A0);
  32015. æRT 87
  32016. æRI IV-179, N87-1
  32017. æC  
  32018. Trap macro    _GetFCBInfo
  32019.  
  32020. Parameter block
  32021.   -->    12    ioCompletion  pointer
  32022.   <--    16    ioResult      word
  32023.   <--    18    ioNamePtr     pointer
  32024.   <->    22    ioVRefNum     word
  32025.   <->    24    ioRefNum      word
  32026.   -->    28    ioFCBIndx     long word
  32027.   <--    32    ioFCBFlNm     long word
  32028.   <--    36    ioFCBFlags    word
  32029.   <--    38    ioFCBStBlk    word
  32030.   <--    40    ioFCBEOF      long word
  32031.   <--    44    ioFCBPLen     long word
  32032.   <--    48    ioFCBCrPs     long word
  32033.   <--    52    ioFCBVRefNum  word
  32034.   <--    54    ioFCBClpSiz   long word
  32035.   <--    58    ioFCBParID    long word
  32036.  
  32037. PBGetFCBInfo returns information about the specified open file. If ioFCBIndx is
  32038. positive, the File Manager returns information about the file whose file number is
  32039. ioFCBIndx on the volume specified by ioVRefNum (which may contain a drive number,
  32040. volume reference number, or working directory reference number). If ioVRefNum is 0,
  32041. all open files are indexed; otherwise, only open files on the specified volume are
  32042. indexed.
  32043.  
  32044. If ioFCBIndx is 0, the File Manager returns information about the file whose access
  32045. path is specified by ioRefNum.
  32046.  
  32047. Assembly-language note:  The global variable FCBSPtr points to the
  32048.                          length word of the file-control-block buffer.
  32049.  
  32050. Each file control block contains 94 bytes of information about an access path; Figure
  32051. 28 shows its structure (using the assembly-language offsets).
  32052.  
  32053. •••Refer to Figure 28.•••
  32054.  
  32055. Figure 28–A File Control Block
  32056.  
  32057. 64K ROM note:  The structure of a file control block in the 64K ROM
  32058.                version of the File Manager is a subset of the above
  32059.                structure. The old file control block contained only
  32060.                the fields up to and including fcbFlPos.
  32061.  
  32062. FCBMdRByt (which corresponds to ioFCBFlags in the parameter block for PBGetFCBInfo)
  32063. contains flags that describe the status of the file, as follows:
  32064.  
  32065.   Bit    Meaning
  32066.   0     Set if data can be written to the file
  32067.   1     Set if the entry describes a resource fork
  32068.   7     Set if the file has been changed since it was last flushed
  32069.  
  32070. Warning:  The size and structure of a file control block may be
  32071.           different in future versions of Macintosh system software.
  32072.  
  32073. æKY PBGetCatInfo
  32074. æFc Files.h
  32075. æT Function
  32076. æD pascal OSErr PBGetCatInfo(CInfoPBPtr paramBlock,Boolean async); 
  32077. æDT OSErr myVariable = PBGetCatInfo((CInfoPBPtr) paramBlock,(Boolean) async);
  32078. æRT 68,69
  32079. æRI IV-155,  V-391, N68-1, N69
  32080. æC 
  32081. •••Refer to Technical Note #69:•••
  32082.  
  32083. Trap macro    _GetCatInfo
  32084.  
  32085. Parameter block
  32086.   Files:                                   Directories:
  32087.   -->    12    ioCompletion   pointer      -->    12    ioCompletion  pointer
  32088.   <--    16    ioResult       word         <--    16    ioResult      word
  32089.   <->    18    ioNamePtr      pointer      <->    18    ioNamePtr     pointer
  32090.   -->    22    ioVRefNum      word         -->    22    ioVRefNum     word
  32091.   <--    24    ioFRefNum      word         <--    24    ioFRefNum     word
  32092.   -->    28    ioFDirIndex    word         -->    28    ioFDirIndex   word
  32093.   <--    30    ioFlAttrib     byte         <--    30    ioFlAttrib    byte
  32094.   <--    31    ioACUser       byte         access rights for directory only
  32095.   <--    32    ioFlFndrInfo   16 bytes     <--    32    ioDrUsrWds    16 bytes
  32096.   <->    48    ioDirID        long word    <->    48    ioDrDirID     long word
  32097.   <--    52    ioFlStBlk      word         <--    52    ioDrNmFls     word
  32098.   <--    54    ioFlLgLen      long word
  32099.   <--    58    ioFlPyLen      long word
  32100.   <--    62    ioFlRStBlk     word
  32101.   <--    64    ioFlRLgLen     long word
  32102.   <--    68    ioFlRPyLen     long word
  32103.   <--    72    ioFlCrDat      long word    <--    72    ioDrCrDat    long word
  32104.   <--    76    ioFlMdDat      long word    <--    76    ioDrMdDat    long word
  32105.   <--    80    ioFlBkDat      long word    <--    80    ioDrBkDat    long word
  32106.   <--    84    ioFlXFndrInfo  16 bytes     <--    84    ioDrFndrInfo 16 bytes
  32107.   <--    100   ioFlParID      long word    <--    100    ioDrParID   long word
  32108.   <--    104   ioFlClpSiz     long word
  32109.  
  32110. PBGetCatInfo gets information about the files and directories in a file catalog. To
  32111. determine whether the information is for a file or a directory, test bit 4 of ioFlAttrib,
  32112. as described in the section “CInfoPBRec”. The information that’s returned for files
  32113. is shown in the left column, and the corresponding information for directories is
  32114. shown in the right column.
  32115.  
  32116. If ioFDirIndex is positive, the File Manager returns information about the file or
  32117. directory whose directory index is ioFDirIndex in the directory specified by ioVRefNum
  32118. (this will be the root directory if a volume reference number is provided).
  32119.  
  32120. If ioFDirIndex is 0, the File Manager returns information about the file or directory
  32121. specified by ioNamePtr, in the directory specified by ioVRefNum
  32122. (again, this will be the root directory if a volume reference number is provided).
  32123.  
  32124. If ioFDirIndex is negative, the File Manager ignores ioNamePtr and returns information
  32125. about the directory specified by ioDirID.
  32126.  
  32127. With files, PBGetCatInfo is similar to PBHGetFileInfo but returns some additional
  32128. information. If the file is open, the reference number of the first access path found
  32129. is returned in ioFRefNum, and the name of the file is returned in ioNamePtr (unless
  32130. ioNamePtr is NIL).
  32131.  
  32132. For server volume directories, in addition to the normal return parameters the ioACUser
  32133. field returns the user’s access rights in the following format:
  32134.  
  32135.   Bit    7    if set, user is not the owner of the directory.
  32136.               if clear, user is the owner of the directory.
  32137.          6–3  Reserved; this is returned set to zero.
  32138.          2    If set, user does not have Make Changes privileges
  32139.               to the directory.
  32140.               If clear, user has Make Changes privileges to the directory.
  32141.          1    If set, user does not have See Files privileges to the directory.
  32142.               If clear, user has See Files privileges to the directory.
  32143.          0    If set, user does not have See Folders privileges
  32144.               to the directory.
  32145.               If clear, user has See Folders privileges to the directory.
  32146.  
  32147. For example, if ioACUser returns zero for a given server volume directory, you know
  32148. that the user is the owner of the directory and has complete privileges to it.
  32149.  
  32150. Result codes    noErr     No error
  32151.                 bdNamErr  Bad file name
  32152.                 dirNFErr  Directory not found or incomplete pathname
  32153.                 extFSErr  External file system
  32154.                 fnfErr    File not found
  32155.                 ioErr     I/O error
  32156.                 nsvErr    No such volume
  32157.                 paramErr  No default volume
  32158.  
  32159. æKY PBGetCatInfoSync
  32160. æFc Files.h
  32161. æT Function
  32162. æTN 7009,A260
  32163. æD #pragma parameter __D0 PBGetCatInfoSync(__A0)
  32164. pascal OSErr PBGetCatInfoSync(CInfoPBPtr paramBlock)
  32165.     = {0x7009,0xA260}; 
  32166. æDT #pragma parameter __D0 myVariable = PBGetCatInfoSync()(__A0);
  32167. æRT 68,69
  32168. æRI IV-155,  V-391, N68-1, N69
  32169. æC 
  32170. •••Refer to Technical Note #69:•••
  32171.  
  32172. Trap macro    _GetCatInfo
  32173.  
  32174. Parameter block
  32175.   Files:                                   Directories:
  32176.   -->    12    ioCompletion   pointer      -->    12    ioCompletion  pointer
  32177.   <--    16    ioResult       word         <--    16    ioResult      word
  32178.   <->    18    ioNamePtr      pointer      <->    18    ioNamePtr     pointer
  32179.   -->    22    ioVRefNum      word         -->    22    ioVRefNum     word
  32180.   <--    24    ioFRefNum      word         <--    24    ioFRefNum     word
  32181.   -->    28    ioFDirIndex    word         -->    28    ioFDirIndex   word
  32182.   <--    30    ioFlAttrib     byte         <--    30    ioFlAttrib    byte
  32183.   <--    31    ioACUser       byte         access rights for directory only
  32184.   <--    32    ioFlFndrInfo   16 bytes     <--    32    ioDrUsrWds    16 bytes
  32185.   <->    48    ioDirID        long word    <->    48    ioDrDirID     long word
  32186.   <--    52    ioFlStBlk      word         <--    52    ioDrNmFls     word
  32187.   <--    54    ioFlLgLen      long word
  32188.   <--    58    ioFlPyLen      long word
  32189.   <--    62    ioFlRStBlk     word
  32190.   <--    64    ioFlRLgLen     long word
  32191.   <--    68    ioFlRPyLen     long word
  32192.   <--    72    ioFlCrDat      long word    <--    72    ioDrCrDat    long word
  32193.   <--    76    ioFlMdDat      long word    <--    76    ioDrMdDat    long word
  32194.   <--    80    ioFlBkDat      long word    <--    80    ioDrBkDat    long word
  32195.   <--    84    ioFlXFndrInfo  16 bytes     <--    84    ioDrFndrInfo 16 bytes
  32196.   <--    100   ioFlParID      long word    <--    100    ioDrParID   long word
  32197.   <--    104   ioFlClpSiz     long word
  32198.  
  32199. PBGetCatInfo gets information about the files and directories in a file catalog. To
  32200. determine whether the information is for a file or a directory, test bit 4 of ioFlAttrib,
  32201. as described in the section “CInfoPBRec”. The information that’s returned for files
  32202. is shown in the left column, and the corresponding information for directories is
  32203. shown in the right column.
  32204.  
  32205. If ioFDirIndex is positive, the File Manager returns information about the file or
  32206. directory whose directory index is ioFDirIndex in the directory specified by ioVRefNum
  32207. (this will be the root directory if a volume reference number is provided).
  32208.  
  32209. If ioFDirIndex is 0, the File Manager returns information about the file or directory
  32210. specified by ioNamePtr, in the directory specified by ioVRefNum
  32211. (again, this will be the root directory if a volume reference number is provided).
  32212.  
  32213. If ioFDirIndex is negative, the File Manager ignores ioNamePtr and returns information
  32214. about the directory specified by ioDirID.
  32215.  
  32216. With files, PBGetCatInfo is similar to PBHGetFileInfo but returns some additional
  32217. information. If the file is open, the reference number of the first access path found
  32218. is returned in ioFRefNum, and the name of the file is returned in ioNamePtr (unless
  32219. ioNamePtr is NIL).
  32220.  
  32221. For server volume directories, in addition to the normal return parameters the ioACUser
  32222. field returns the user’s access rights in the following format:
  32223.  
  32224.   Bit    7    if set, user is not the owner of the directory.
  32225.               if clear, user is the owner of the directory.
  32226.          6–3  Reserved; this is returned set to zero.
  32227.          2    If set, user does not have Make Changes privileges
  32228.               to the directory.
  32229.               If clear, user has Make Changes privileges to the directory.
  32230.          1    If set, user does not have See Files privileges to the directory.
  32231.               If clear, user has See Files privileges to the directory.
  32232.          0    If set, user does not have See Folders privileges
  32233.               to the directory.
  32234.               If clear, user has See Folders privileges to the directory.
  32235.  
  32236. For example, if ioACUser returns zero for a given server volume directory, you know
  32237. that the user is the owner of the directory and has complete privileges to it.
  32238.  
  32239. Result codes    noErr     No error
  32240.                 bdNamErr  Bad file name
  32241.                 dirNFErr  Directory not found or incomplete pathname
  32242.                 extFSErr  External file system
  32243.                 fnfErr    File not found
  32244.                 ioErr     I/O error
  32245.                 nsvErr    No such volume
  32246.                 paramErr  No default volume
  32247.  
  32248. æKY PBGetCatInfoAsync
  32249. æFc Files.h
  32250. æT Function
  32251. æTN 7009,A660
  32252. æD #pragma parameter __D0 PBGetCatInfoAsync(__A0)
  32253. pascal OSErr PBGetCatInfoAsync(CInfoPBPtr paramBlock)
  32254.     = {0x7009,0xA660}; 
  32255. æDT #pragma parameter __D0 myVariable = PBGetCatInfoAsync()(__A0);
  32256. æRT 68,69
  32257. æRI IV-155,  V-391, N68-1, N69
  32258. æC 
  32259. •••Refer to Technical Note #69:•••
  32260.  
  32261. Trap macro    _GetCatInfo
  32262.  
  32263. Parameter block
  32264.   Files:                                   Directories:
  32265.   -->    12    ioCompletion   pointer      -->    12    ioCompletion  pointer
  32266.   <--    16    ioResult       word         <--    16    ioResult      word
  32267.   <->    18    ioNamePtr      pointer      <->    18    ioNamePtr     pointer
  32268.   -->    22    ioVRefNum      word         -->    22    ioVRefNum     word
  32269.   <--    24    ioFRefNum      word         <--    24    ioFRefNum     word
  32270.   -->    28    ioFDirIndex    word         -->    28    ioFDirIndex   word
  32271.   <--    30    ioFlAttrib     byte         <--    30    ioFlAttrib    byte
  32272.   <--    31    ioACUser       byte         access rights for directory only
  32273.   <--    32    ioFlFndrInfo   16 bytes     <--    32    ioDrUsrWds    16 bytes
  32274.   <->    48    ioDirID        long word    <->    48    ioDrDirID     long word
  32275.   <--    52    ioFlStBlk      word         <--    52    ioDrNmFls     word
  32276.   <--    54    ioFlLgLen      long word
  32277.   <--    58    ioFlPyLen      long word
  32278.   <--    62    ioFlRStBlk     word
  32279.   <--    64    ioFlRLgLen     long word
  32280.   <--    68    ioFlRPyLen     long word
  32281.   <--    72    ioFlCrDat      long word    <--    72    ioDrCrDat    long word
  32282.   <--    76    ioFlMdDat      long word    <--    76    ioDrMdDat    long word
  32283.   <--    80    ioFlBkDat      long word    <--    80    ioDrBkDat    long word
  32284.   <--    84    ioFlXFndrInfo  16 bytes     <--    84    ioDrFndrInfo 16 bytes
  32285.   <--    100   ioFlParID      long word    <--    100    ioDrParID   long word
  32286.   <--    104   ioFlClpSiz     long word
  32287.  
  32288. PBGetCatInfo gets information about the files and directories in a file catalog. To
  32289. determine whether the information is for a file or a directory, test bit 4 of ioFlAttrib,
  32290. as described in the section “CInfoPBRec”. The information that’s returned for files
  32291. is shown in the left column, and the corresponding information for directories is
  32292. shown in the right column.
  32293.  
  32294. If ioFDirIndex is positive, the File Manager returns information about the file or
  32295. directory whose directory index is ioFDirIndex in the directory specified by ioVRefNum
  32296. (this will be the root directory if a volume reference number is provided).
  32297.  
  32298. If ioFDirIndex is 0, the File Manager returns information about the file or directory
  32299. specified by ioNamePtr, in the directory specified by ioVRefNum
  32300. (again, this will be the root directory if a volume reference number is provided).
  32301.  
  32302. If ioFDirIndex is negative, the File Manager ignores ioNamePtr and returns information
  32303. about the directory specified by ioDirID.
  32304.  
  32305. With files, PBGetCatInfo is similar to PBHGetFileInfo but returns some additional
  32306. information. If the file is open, the reference number of the first access path found
  32307. is returned in ioFRefNum, and the name of the file is returned in ioNamePtr (unless
  32308. ioNamePtr is NIL).
  32309.  
  32310. For server volume directories, in addition to the normal return parameters the ioACUser
  32311. field returns the user’s access rights in the following format:
  32312.  
  32313.   Bit    7    if set, user is not the owner of the directory.
  32314.               if clear, user is the owner of the directory.
  32315.          6–3  Reserved; this is returned set to zero.
  32316.          2    If set, user does not have Make Changes privileges
  32317.               to the directory.
  32318.               If clear, user has Make Changes privileges to the directory.
  32319.          1    If set, user does not have See Files privileges to the directory.
  32320.               If clear, user has See Files privileges to the directory.
  32321.          0    If set, user does not have See Folders privileges
  32322.               to the directory.
  32323.               If clear, user has See Folders privileges to the directory.
  32324.  
  32325. For example, if ioACUser returns zero for a given server volume directory, you know
  32326. that the user is the owner of the directory and has complete privileges to it.
  32327.  
  32328. Result codes    noErr     No error
  32329.                 bdNamErr  Bad file name
  32330.                 dirNFErr  Directory not found or incomplete pathname
  32331.                 extFSErr  External file system
  32332.                 fnfErr    File not found
  32333.                 ioErr     I/O error
  32334.                 nsvErr    No such volume
  32335.                 paramErr  No default volume
  32336.  
  32337. æKY PBSetCatInfo
  32338. æFc Files.h
  32339. æT Function
  32340. æD pascal OSErr PBSetCatInfo(CInfoPBPtr paramBlock,Boolean async); 
  32341. æDT OSErr myVariable = PBSetCatInfo((CInfoPBPtr) paramBlock,(Boolean) async);
  32342. æRI IV-156
  32343. æC 
  32344. Trap macro    _SetCatInfo
  32345.  
  32346. Parameter block
  32347.  
  32348.   Files:                                  Directories:
  32349.   -->    12    ioCompletion  pointer      -->    12    ioCompletion  pointer
  32350.   <--    16    ioResult      word         <--    16    ioResult      word
  32351.   <->    18    ioNamePtr     pointer      <->    18    ioNamePtr     pointer
  32352.   -->    22    ioVRefNum     word         -->    22    ioVRefNum     word
  32353.   -->    30    ioFlAttrib    byte         -->    30    ioFlAttrib    byte
  32354.   -->    32    ioFlFndrInfo  16 bytes     -->    32    ioDrUsrWds    16 bytes
  32355.   -->    48    ioDirID       long word    -->    48    ioDrDirID     long word
  32356.   -->    72    ioFlCrDat     long word    -->    72    ioDrCrDat     long word
  32357.   -->    76    ioFlMdDat     long word    -->    76    ioDrMdDat     long word
  32358.   -->    80    ioFlBkDat     long word    -->    80    ioDrBkDat     long word
  32359.   -->    84    ioFlXFndrInfo 16 bytes     -->    84    ioDrFndrInfo  16 bytes
  32360.   -->    104   ioFlClpSiz    long word
  32361.  
  32362. PBSetCatInfo sets information about the files and directories in a catalog. With
  32363. files, it’s similar to PBHSetFileInfo but lets you set some additional information.
  32364. The information that can be set for files is shown in the left column, and the corresponding
  32365. information for directories is shown in the right column.
  32366.  
  32367. Result codes    noErr     No error
  32368.                 bdNamErr  Bad file name
  32369.                 dirNFErr  Directory not found or incomplete pathname
  32370.                 extFSErr  External file system
  32371.                 fnfErr    File not found
  32372.                 ioErr     I/O error
  32373.                 nsvErr    No such volume
  32374.                 paramErr  No default volume
  32375.  
  32376. æKY PBSetCatInfoSync
  32377. æFc Files.h
  32378. æT Function
  32379. æTN 700A,A260
  32380. æD #pragma parameter __D0 PBSetCatInfoSync(__A0)
  32381. pascal OSErr PBSetCatInfoSync(CInfoPBPtr paramBlock)
  32382.     = {0x700A,0xA260}; 
  32383. æDT #pragma parameter __D0 myVariable = PBSetCatInfoSync()(__A0);
  32384. æRI IV-156
  32385. æC 
  32386. Trap macro    _SetCatInfo
  32387.  
  32388. Parameter block
  32389.  
  32390.   Files:                                  Directories:
  32391.   -->    12    ioCompletion  pointer      -->    12    ioCompletion  pointer
  32392.   <--    16    ioResult      word         <--    16    ioResult      word
  32393.   <->    18    ioNamePtr     pointer      <->    18    ioNamePtr     pointer
  32394.   -->    22    ioVRefNum     word         -->    22    ioVRefNum     word
  32395.   -->    30    ioFlAttrib    byte         -->    30    ioFlAttrib    byte
  32396.   -->    32    ioFlFndrInfo  16 bytes     -->    32    ioDrUsrWds    16 bytes
  32397.   -->    48    ioDirID       long word    -->    48    ioDrDirID     long word
  32398.   -->    72    ioFlCrDat     long word    -->    72    ioDrCrDat     long word
  32399.   -->    76    ioFlMdDat     long word    -->    76    ioDrMdDat     long word
  32400.   -->    80    ioFlBkDat     long word    -->    80    ioDrBkDat     long word
  32401.   -->    84    ioFlXFndrInfo 16 bytes     -->    84    ioDrFndrInfo  16 bytes
  32402.   -->    104   ioFlClpSiz    long word
  32403.  
  32404. PBSetCatInfo sets information about the files and directories in a catalog. With
  32405. files, it’s similar to PBHSetFileInfo but lets you set some additional information.
  32406. The information that can be set for files is shown in the left column, and the corresponding
  32407. information for directories is shown in the right column.
  32408.  
  32409. Result codes    noErr     No error
  32410.                 bdNamErr  Bad file name
  32411.                 dirNFErr  Directory not found or incomplete pathname
  32412.                 extFSErr  External file system
  32413.                 fnfErr    File not found
  32414.                 ioErr     I/O error
  32415.                 nsvErr    No such volume
  32416.                 paramErr  No default volume
  32417.  
  32418. æKY PBSetCatInfoAsync
  32419. æFc Files.h
  32420. æT Function
  32421. æTN 700A,A660
  32422. æD #pragma parameter __D0 PBSetCatInfoAsync(__A0)
  32423. pascal OSErr PBSetCatInfoAsync(CInfoPBPtr paramBlock)
  32424.     = {0x700A,0xA660}; 
  32425. æDT #pragma parameter __D0 myVariable = PBSetCatInfoAsync()(__A0);
  32426. æRI IV-156
  32427. æC 
  32428. Trap macro    _SetCatInfo
  32429.  
  32430. Parameter block
  32431.  
  32432.   Files:                                  Directories:
  32433.   -->    12    ioCompletion  pointer      -->    12    ioCompletion  pointer
  32434.   <--    16    ioResult      word         <--    16    ioResult      word
  32435.   <->    18    ioNamePtr     pointer      <->    18    ioNamePtr     pointer
  32436.   -->    22    ioVRefNum     word         -->    22    ioVRefNum     word
  32437.   -->    30    ioFlAttrib    byte         -->    30    ioFlAttrib    byte
  32438.   -->    32    ioFlFndrInfo  16 bytes     -->    32    ioDrUsrWds    16 bytes
  32439.   -->    48    ioDirID       long word    -->    48    ioDrDirID     long word
  32440.   -->    72    ioFlCrDat     long word    -->    72    ioDrCrDat     long word
  32441.   -->    76    ioFlMdDat     long word    -->    76    ioDrMdDat     long word
  32442.   -->    80    ioFlBkDat     long word    -->    80    ioDrBkDat     long word
  32443.   -->    84    ioFlXFndrInfo 16 bytes     -->    84    ioDrFndrInfo  16 bytes
  32444.   -->    104   ioFlClpSiz    long word
  32445.  
  32446. PBSetCatInfo sets information about the files and directories in a catalog. With
  32447. files, it’s similar to PBHSetFileInfo but lets you set some additional information.
  32448. The information that can be set for files is shown in the left column, and the corresponding
  32449. information for directories is shown in the right column.
  32450.  
  32451. Result codes    noErr     No error
  32452.                 bdNamErr  Bad file name
  32453.                 dirNFErr  Directory not found or incomplete pathname
  32454.                 extFSErr  External file system
  32455.                 fnfErr    File not found
  32456.                 ioErr     I/O error
  32457.                 nsvErr    No such volume
  32458.                 paramErr  No default volume
  32459.  
  32460. æKY PBAllocContig
  32461. æFc Files.h
  32462. æT Function
  32463. æD pascal OSErr PBAllocContig(ParmBlkPtr paramBlock,Boolean async); 
  32464. æDT OSErr myVariable = PBAllocContig((ParmBlkPtr) paramBlock,(Boolean) async);
  32465. æRI IV-143
  32466. æC 
  32467. Trap macro    _AllocContig
  32468.  
  32469. Parameter block
  32470.   -->    12    ioCompletion  pointer
  32471.   <--    16    ioResult      word
  32472.   -->    24    ioRefNum      word
  32473.   -->    36    ioReqCount    long word
  32474.   <--    40    ioActCount    long word
  32475.  
  32476. PBAllocContig is identical to PBAllocate except that if there isn’t enough contiguous
  32477. empty space on the volume to satisfy the allocation request, PBAllocContig will do
  32478. nothing and will return dskFulErr as its function result. If you want to allocate
  32479. whatever space is available, even when the entire request cannot be filled as a
  32480. contiguous piece, call PBAllocate instead.
  32481.  
  32482. Result codes    noErr      No error
  32483.                 dskFulErr  Disk full
  32484.                 fLckdErr   File locked
  32485.                 fnOpnErr   File not open
  32486.                 ioErr      I/O error
  32487.                 rfNumErr   Bad reference number
  32488.                 vLckdErr   Software volume lock
  32489.                 wPrErr     Hardware volume lock
  32490.                 wrPermErr  Read/write permission doesn’t allow writing
  32491.  
  32492. æKY PBAllocContigSync
  32493. æFc Files.h
  32494. æT Function
  32495. æTN A210
  32496. æD #pragma parameter __D0 PBAllocContigSync(__A0)
  32497. pascal OSErr PBAllocContigSync(ParmBlkPtr paramBlock)
  32498.     = 0xA210; 
  32499. æDT #pragma parameter __D0 myVariable = PBAllocContigSync()(__A0);
  32500. æRI IV-143
  32501. æC 
  32502. Trap macro    _AllocContig
  32503.  
  32504. Parameter block
  32505.   -->    12    ioCompletion  pointer
  32506.   <--    16    ioResult      word
  32507.   -->    24    ioRefNum      word
  32508.   -->    36    ioReqCount    long word
  32509.   <--    40    ioActCount    long word
  32510.  
  32511. PBAllocContig is identical to PBAllocate except that if there isn’t enough contiguous
  32512. empty space on the volume to satisfy the allocation request, PBAllocContig will do
  32513. nothing and will return dskFulErr as its function result. If you want to allocate
  32514. whatever space is available, even when the entire request cannot be filled as a
  32515. contiguous piece, call PBAllocate instead.
  32516.  
  32517. Result codes    noErr      No error
  32518.                 dskFulErr  Disk full
  32519.                 fLckdErr   File locked
  32520.                 fnOpnErr   File not open
  32521.                 ioErr      I/O error
  32522.                 rfNumErr   Bad reference number
  32523.                 vLckdErr   Software volume lock
  32524.                 wPrErr     Hardware volume lock
  32525.                 wrPermErr  Read/write permission doesn’t allow writing
  32526.  
  32527. æKY PBAllocContigAsync
  32528. æFc Files.h
  32529. æT Function
  32530. æTN A610
  32531. æD #pragma parameter __D0 PBAllocContigAsync(__A0)
  32532. pascal OSErr PBAllocContigAsync(ParmBlkPtr paramBlock)
  32533.     = 0xA610; 
  32534. æDT #pragma parameter __D0 myVariable = PBAllocContigAsync()(__A0);
  32535. æRI IV-143
  32536. æC 
  32537. Trap macro    _AllocContig
  32538.  
  32539. Parameter block
  32540.   -->    12    ioCompletion  pointer
  32541.   <--    16    ioResult      word
  32542.   -->    24    ioRefNum      word
  32543.   -->    36    ioReqCount    long word
  32544.   <--    40    ioActCount    long word
  32545.  
  32546. PBAllocContig is identical to PBAllocate except that if there isn’t enough contiguous
  32547. empty space on the volume to satisfy the allocation request, PBAllocContig will do
  32548. nothing and will return dskFulErr as its function result. If you want to allocate
  32549. whatever space is available, even when the entire request cannot be filled as a
  32550. contiguous piece, call PBAllocate instead.
  32551.  
  32552. Result codes    noErr      No error
  32553.                 dskFulErr  Disk full
  32554.                 fLckdErr   File locked
  32555.                 fnOpnErr   File not open
  32556.                 ioErr      I/O error
  32557.                 rfNumErr   Bad reference number
  32558.                 vLckdErr   Software volume lock
  32559.                 wPrErr     Hardware volume lock
  32560.                 wrPermErr  Read/write permission doesn’t allow writing
  32561.  
  32562. æKY PBLockRange
  32563. æFc Files.h
  32564. æT Function
  32565. æD pascal OSErr PBLockRange(ParmBlkPtr paramBlock,Boolean async); 
  32566. æDT OSErr myVariable = PBLockRange((ParmBlkPtr) paramBlock,(Boolean) async);
  32567. æRT 186
  32568. æRI IV-138
  32569. æC 
  32570. •••Refer to Technical Note #186:•••
  32571.  
  32572. Trap macro    _LockRng
  32573.  
  32574. Parameter block
  32575.   -->    12    ioCompletion  pointer
  32576.   <--    16    ioResult      word
  32577.   -->    24    ioRefNum      word
  32578.   -->    36    ioReqCount    long word
  32579.   -->    44    ioPosMode     word
  32580.   -->    46    ioPosOffset   long word
  32581.  
  32582. On a file opened with a shared read/write permission, PBLockRange is used in conjunction
  32583. with PBRead and PBWrite to lock a certain portion of the file. PBLockRange uses the
  32584. same parameters as both PBRead and PBWrite; by calling it immediately before PBRead,
  32585. you can use the information present in the parameter block for the PBRead call.
  32586.  
  32587. When you’re finished with the data (typically after a call to PBWrite), be sure to
  32588. call PBUnlockRange to free up that portion of the file for subsequent PBRead calls.
  32589.  
  32590. Warning:  PBLockRange operates only with the hierarchical version of the
  32591.           File Manager; if used on a Macintosh equipped only with the 64K
  32592.           ROM version of the File Manager, it will generate a system error.
  32593.  
  32594. Result codes    noErr     No error
  32595.                 eofErr    End-of-file
  32596.                 extFSErr  External file system
  32597.                 fnOpnErr  File not open
  32598.                 ioErr     I/O error
  32599.                 paramErr  Negative ioReqCount
  32600.                 rfNumErr  Bad reference number
  32601.  
  32602. æKY PBLockRangeSync
  32603. æFc Files.h
  32604. æT Function
  32605. æTN 7010,A260
  32606. æD #pragma parameter __D0 PBLockRangeSync(__A0)
  32607. pascal OSErr PBLockRangeSync(ParmBlkPtr paramBlock)
  32608.     = {0x7010,0xA260}; 
  32609. æDT #pragma parameter __D0 myVariable = PBLockRangeSync()(__A0);
  32610. æRT 186
  32611. æRI IV-138
  32612. æC 
  32613. •••Refer to Technical Note #186:•••
  32614.  
  32615. Trap macro    _LockRng
  32616.  
  32617. Parameter block
  32618.   -->    12    ioCompletion  pointer
  32619.   <--    16    ioResult      word
  32620.   -->    24    ioRefNum      word
  32621.   -->    36    ioReqCount    long word
  32622.   -->    44    ioPosMode     word
  32623.   -->    46    ioPosOffset   long word
  32624.  
  32625. On a file opened with a shared read/write permission, PBLockRange is used in conjunction
  32626. with PBRead and PBWrite to lock a certain portion of the file. PBLockRange uses the
  32627. same parameters as both PBRead and PBWrite; by calling it immediately before PBRead,
  32628. you can use the information present in the parameter block for the PBRead call.
  32629.  
  32630. When you’re finished with the data (typically after a call to PBWrite), be sure to
  32631. call PBUnlockRange to free up that portion of the file for subsequent PBRead calls.
  32632.  
  32633. Warning:  PBLockRange operates only with the hierarchical version of the
  32634.           File Manager; if used on a Macintosh equipped only with the 64K
  32635.           ROM version of the File Manager, it will generate a system error.
  32636.  
  32637. Result codes    noErr     No error
  32638.                 eofErr    End-of-file
  32639.                 extFSErr  External file system
  32640.                 fnOpnErr  File not open
  32641.                 ioErr     I/O error
  32642.                 paramErr  Negative ioReqCount
  32643.                 rfNumErr  Bad reference number
  32644.  
  32645. æKY PBLockRangeAsync
  32646. æFc Files.h
  32647. æT Function
  32648. æTN 7010,A660
  32649. æD #pragma parameter __D0 PBLockRangeAsync(__A0)
  32650. pascal OSErr PBLockRangeAsync(ParmBlkPtr paramBlock)
  32651.     = {0x7010,0xA660}; 
  32652. æDT #pragma parameter __D0 myVariable = PBLockRangeAsync()(__A0);
  32653. æRT 186
  32654. æRI IV-138
  32655. æC 
  32656. •••Refer to Technical Note #186:•••
  32657.  
  32658. Trap macro    _LockRng
  32659.  
  32660. Parameter block
  32661.   -->    12    ioCompletion  pointer
  32662.   <--    16    ioResult      word
  32663.   -->    24    ioRefNum      word
  32664.   -->    36    ioReqCount    long word
  32665.   -->    44    ioPosMode     word
  32666.   -->    46    ioPosOffset   long word
  32667.  
  32668. On a file opened with a shared read/write permission, PBLockRange is used in conjunction
  32669. with PBRead and PBWrite to lock a certain portion of the file. PBLockRange uses the
  32670. same parameters as both PBRead and PBWrite; by calling it immediately before PBRead,
  32671. you can use the information present in the parameter block for the PBRead call.
  32672.  
  32673. When you’re finished with the data (typically after a call to PBWrite), be sure to
  32674. call PBUnlockRange to free up that portion of the file for subsequent PBRead calls.
  32675.  
  32676. Warning:  PBLockRange operates only with the hierarchical version of the
  32677.           File Manager; if used on a Macintosh equipped only with the 64K
  32678.           ROM version of the File Manager, it will generate a system error.
  32679.  
  32680. Result codes    noErr     No error
  32681.                 eofErr    End-of-file
  32682.                 extFSErr  External file system
  32683.                 fnOpnErr  File not open
  32684.                 ioErr     I/O error
  32685.                 paramErr  Negative ioReqCount
  32686.                 rfNumErr  Bad reference number
  32687.  
  32688. æKY PBUnlockRange
  32689. æFc Files.h
  32690. æT Function
  32691. æD pascal OSErr PBUnlockRange(ParmBlkPtr paramBlock,Boolean async); 
  32692. æDT OSErr myVariable = PBUnlockRange((ParmBlkPtr) paramBlock,(Boolean) async);
  32693. æRT 186
  32694. æRI IV-139
  32695. æC 
  32696. Trap macro    _UnlockRng
  32697.  
  32698. Parameter block
  32699.   -->    12    ioCompletion  pointer
  32700.   <--    16    ioResult      word
  32701.   -->    24    ioRefNum      word
  32702.   -->    36    ioReqCount    long word
  32703.   -->    44    ioPosMode     word
  32704.   -->    46    ioPosOffset   long word
  32705.  
  32706. PBUnlockRange is used in conjunction with PBRead and PBWrite to unlock a certain
  32707. portion of a file that you locked with PBLockRange.
  32708.  
  32709. Warning:  PBUnlockRange operates only with the hierarchical version of
  32710.           the File Manager; if used on a Macintosh equipped only with
  32711.           the 64K ROM version of the File Manager, it will generate a
  32712.           system error.
  32713.  
  32714. Result codes    noErr     No error
  32715.                 eofErr    End-of-file
  32716.                 extFSErr  External file system
  32717.                 fnOpnErr  File not open
  32718.                 ioErr     I/O error
  32719.                 paramErr  Negative ioReqCount
  32720.                 rfNumErr  Bad reference number
  32721.  
  32722. æKY PBUnlockRangeSync
  32723. æFc Files.h
  32724. æT Function
  32725. æTN 7011,A260
  32726. æD #pragma parameter __D0 PBUnlockRangeSync(__A0)
  32727. pascal OSErr PBUnlockRangeSync(ParmBlkPtr paramBlock)
  32728.     = {0x7011,0xA260}; 
  32729. æDT #pragma parameter __D0 myVariable = PBUnlockRangeSync()(__A0);
  32730. æRT 186
  32731. æRI IV-139
  32732. æC 
  32733. Trap macro    _UnlockRng
  32734.  
  32735. Parameter block
  32736.   -->    12    ioCompletion  pointer
  32737.   <--    16    ioResult      word
  32738.   -->    24    ioRefNum      word
  32739.   -->    36    ioReqCount    long word
  32740.   -->    44    ioPosMode     word
  32741.   -->    46    ioPosOffset   long word
  32742.  
  32743. PBUnlockRange is used in conjunction with PBRead and PBWrite to unlock a certain
  32744. portion of a file that you locked with PBLockRange.
  32745.  
  32746. Warning:  PBUnlockRange operates only with the hierarchical version of
  32747.           the File Manager; if used on a Macintosh equipped only with
  32748.           the 64K ROM version of the File Manager, it will generate a
  32749.           system error.
  32750.  
  32751. Result codes    noErr     No error
  32752.                 eofErr    End-of-file
  32753.                 extFSErr  External file system
  32754.                 fnOpnErr  File not open
  32755.                 ioErr     I/O error
  32756.                 paramErr  Negative ioReqCount
  32757.                 rfNumErr  Bad reference number
  32758.  
  32759. æKY PBUnlockRangeAsync
  32760. æFc Files.h
  32761. æT Function
  32762. æTN 7011,A660
  32763. æD #pragma parameter __D0 PBUnlockRangeAsync(__A0)
  32764. pascal OSErr PBUnlockRangeAsync(ParmBlkPtr paramBlock)
  32765.     = {0x7011,0xA660}; 
  32766. æDT #pragma parameter __D0 myVariable = PBUnlockRangeAsync()(__A0);
  32767. æRT 186
  32768. æRI IV-139
  32769. æC 
  32770. Trap macro    _UnlockRng
  32771.  
  32772. Parameter block
  32773.   -->    12    ioCompletion  pointer
  32774.   <--    16    ioResult      word
  32775.   -->    24    ioRefNum      word
  32776.   -->    36    ioReqCount    long word
  32777.   -->    44    ioPosMode     word
  32778.   -->    46    ioPosOffset   long word
  32779.  
  32780. PBUnlockRange is used in conjunction with PBRead and PBWrite to unlock a certain
  32781. portion of a file that you locked with PBLockRange.
  32782.  
  32783. Warning:  PBUnlockRange operates only with the hierarchical version of
  32784.           the File Manager; if used on a Macintosh equipped only with
  32785.           the 64K ROM version of the File Manager, it will generate a
  32786.           system error.
  32787.  
  32788. Result codes    noErr     No error
  32789.                 eofErr    End-of-file
  32790.                 extFSErr  External file system
  32791.                 fnOpnErr  File not open
  32792.                 ioErr     I/O error
  32793.                 paramErr  Negative ioReqCount
  32794.                 rfNumErr  Bad reference number
  32795.  
  32796. æKY PBSetVInfo
  32797. æFc Files.h
  32798. æT Function
  32799. æD pascal OSErr PBSetVInfo(HParmBlkPtr paramBlock,Boolean async); 
  32800. æDT OSErr myVariable = PBSetVInfo((HParmBlkPtr) paramBlock,(Boolean) async);
  32801. æRT 204
  32802. æRI IV-131
  32803. æC 
  32804. •••Refer to Technical Note #204:•••
  32805.  
  32806. Trap macro    _SetVolInfo
  32807.  
  32808. Parameter block
  32809.   -->    12    ioCompletion  pointer
  32810.   <--    16    ioResult      word
  32811.   -->    18    ioNamePtr     pointer
  32812.   -->    22    ioVRefNum     word
  32813.   -->    30    ioVCrDate     long word
  32814.   -->    34    ioVLsMod      long word
  32815.   -->    38    ioVAtrb       word
  32816.   -->    52    ioVClpSiz     long word
  32817.   -->    72    ioVBkUp       long word
  32818.   -->    76    ioVSeqNum     word
  32819.   -->    90    ioVFndrInfo   32 bytes
  32820.  
  32821. PBSetVInfo lets you modify information about volumes. A pointer to a new name for the
  32822. volume can be specified in ioNamePtr. The date and time of the volume’s creation and
  32823. modification can be set with ioVCrDate and ioVLsMod respectively. Only bit 15 of
  32824. ioVAtrb can be changed; setting it locks the volume.
  32825.  
  32826. Note:  The volume cannot be specified by name; you must use either the
  32827.        volume reference number or the drive number.
  32828.  
  32829. Warning:  PBSetVInfo operates only with the hierarchical version of the
  32830.           File Manager; if used on a Macintosh equipped only with the
  32831.           64K ROM version of the File Manager, it will generate a system error.
  32832.  
  32833. Result codes    noErr       No error
  32834.                 nsvErr      No such volume
  32835.                 paramErr    No default volume
  32836.  
  32837. æKY PBSetVInfoSync
  32838. æFc Files.h
  32839. æT Function
  32840. æTN 700B,A260
  32841. æD #pragma parameter __D0 PBSetVInfoSync(__A0)
  32842. pascal OSErr PBSetVInfoSync(HParmBlkPtr paramBlock)
  32843.     = {0x700B,0xA260}; 
  32844. æDT #pragma parameter __D0 myVariable = PBSetVInfoSync()(__A0);
  32845. æRT 204
  32846. æRI IV-131
  32847. æC 
  32848. •••Refer to Technical Note #204:•••
  32849.  
  32850. Trap macro    _SetVolInfo
  32851.  
  32852. Parameter block
  32853.   -->    12    ioCompletion  pointer
  32854.   <--    16    ioResult      word
  32855.   -->    18    ioNamePtr     pointer
  32856.   -->    22    ioVRefNum     word
  32857.   -->    30    ioVCrDate     long word
  32858.   -->    34    ioVLsMod      long word
  32859.   -->    38    ioVAtrb       word
  32860.   -->    52    ioVClpSiz     long word
  32861.   -->    72    ioVBkUp       long word
  32862.   -->    76    ioVSeqNum     word
  32863.   -->    90    ioVFndrInfo   32 bytes
  32864.  
  32865. PBSetVInfo lets you modify information about volumes. A pointer to a new name for the
  32866. volume can be specified in ioNamePtr. The date and time of the volume’s creation and
  32867. modification can be set with ioVCrDate and ioVLsMod respectively. Only bit 15 of
  32868. ioVAtrb can be changed; setting it locks the volume.
  32869.  
  32870. Note:  The volume cannot be specified by name; you must use either the
  32871.        volume reference number or the drive number.
  32872.  
  32873. Warning:  PBSetVInfo operates only with the hierarchical version of the
  32874.           File Manager; if used on a Macintosh equipped only with the
  32875.           64K ROM version of the File Manager, it will generate a system error.
  32876.  
  32877. Result codes    noErr       No error
  32878.                 nsvErr      No such volume
  32879.                 paramErr    No default volume
  32880.  
  32881. æKY PBSetVInfoAsync
  32882. æFc Files.h
  32883. æT Function
  32884. æTN 700B,A660
  32885. æD #pragma parameter __D0 PBSetVInfoAsync(__A0)
  32886. pascal OSErr PBSetVInfoAsync(HParmBlkPtr paramBlock)
  32887.     = {0x700B,0xA660}; 
  32888. æDT #pragma parameter __D0 myVariable = PBSetVInfoAsync()(__A0);
  32889. æRT 204
  32890. æRI IV-131
  32891. æC 
  32892. •••Refer to Technical Note #204:•••
  32893.  
  32894. Trap macro    _SetVolInfo
  32895.  
  32896. Parameter block
  32897.   -->    12    ioCompletion  pointer
  32898.   <--    16    ioResult      word
  32899.   -->    18    ioNamePtr     pointer
  32900.   -->    22    ioVRefNum     word
  32901.   -->    30    ioVCrDate     long word
  32902.   -->    34    ioVLsMod      long word
  32903.   -->    38    ioVAtrb       word
  32904.   -->    52    ioVClpSiz     long word
  32905.   -->    72    ioVBkUp       long word
  32906.   -->    76    ioVSeqNum     word
  32907.   -->    90    ioVFndrInfo   32 bytes
  32908.  
  32909. PBSetVInfo lets you modify information about volumes. A pointer to a new name for the
  32910. volume can be specified in ioNamePtr. The date and time of the volume’s creation and
  32911. modification can be set with ioVCrDate and ioVLsMod respectively. Only bit 15 of
  32912. ioVAtrb can be changed; setting it locks the volume.
  32913.  
  32914. Note:  The volume cannot be specified by name; you must use either the
  32915.        volume reference number or the drive number.
  32916.  
  32917. Warning:  PBSetVInfo operates only with the hierarchical version of the
  32918.           File Manager; if used on a Macintosh equipped only with the
  32919.           64K ROM version of the File Manager, it will generate a system error.
  32920.  
  32921. Result codes    noErr       No error
  32922.                 nsvErr      No such volume
  32923.                 paramErr    No default volume
  32924.  
  32925. æKY PBHGetVInfo
  32926. æFc Files.h
  32927. æT Function
  32928. æD pascal OSErr PBHGetVInfo(HParmBlkPtr paramBlock,Boolean async); 
  32929. æDT OSErr myVariable = PBHGetVInfo((HParmBlkPtr) paramBlock,(Boolean) async);
  32930. æRT 24, 66, 67, 77, 106, 157
  32931. æRI IV-130, N66-1, N67-1, N77-5  
  32932. æC 
  32933. Trap macro    _HGetVInfo
  32934.  
  32935. Parameter block
  32936.   -->    12    ioCompletion  pointer
  32937.   <--    16    ioResult      word
  32938.   <->    18    ioNamePtr     pointer
  32939.   <->    22    ioVRefNum     word
  32940.   -->    28    ioVolIndex    word
  32941.   <--    30    ioVCrDate     long word
  32942.   <--    34    ioVLsMod      long word
  32943.   <--    38    ioVAtrb       word
  32944.   <--    40    ioVNmFls      word
  32945.   <--    42    ioVBitMap     word
  32946.   <--    44    ioVAllocPtr   word
  32947.   <--    46    ioVNmAlBlks   word
  32948.   <--    48    ioVAlBlkSiz   long word
  32949.   <--    52    ioVClpSiz     long word
  32950.   <--    56    ioAlBlSt      word
  32951.   <--    58    ioVNxtFNum    long word
  32952.   <--    62    ioVFrBlk      word
  32953.   <--    64    ioVSigWord    word
  32954.   <--    66    ioVDrvInfo    word
  32955.   <--    68    ioVDRefNum    word
  32956.   <--    70    ioVFSID       word
  32957.   <--    72    ioVBkUp       long word
  32958.   <--    76    ioVSeqNum     word
  32959.   <--    78    ioVWrCnt      long word
  32960.   <--    82    ioVFilCnt     long word
  32961.   <--    86    ioVDirCnt     long word
  32962.   <--    90    ioVFndrInfo   32 bytes
  32963.  
  32964. PBHGetVInfo is similar in function to PBGetVInfo but returns a larger parameter
  32965. block. In addition, PBHGetVInfo always returns the volume reference number in ioVRefNum
  32966. (regardless of what was passed in). Also, ioVNmAlBlks and ioVFrBlks are not clipped
  32967. as they are by PBGetVInfo.
  32968.  
  32969. Result codes    noErr       No error
  32970.                 nsvErr      No such volume
  32971.                 paramErr    No default volume
  32972.  
  32973. æKY PBHGetVInfoSync
  32974. æFc Files.h
  32975. æT Function
  32976. æTN A207
  32977. æD #pragma parameter __D0 PBHGetVInfoSync(__A0)
  32978. pascal OSErr PBHGetVInfoSync(HParmBlkPtr paramBlock)
  32979.     = 0xA207; 
  32980. æDT #pragma parameter __D0 myVariable = PBHGetVInfoSync()(__A0);
  32981. æRT 24, 66, 67, 77, 106, 157
  32982. æRI IV-130, N66-1, N67-1, N77-5  
  32983. æC 
  32984. Trap macro    _HGetVInfo
  32985.  
  32986. Parameter block
  32987.   -->    12    ioCompletion  pointer
  32988.   <--    16    ioResult      word
  32989.   <->    18    ioNamePtr     pointer
  32990.   <->    22    ioVRefNum     word
  32991.   -->    28    ioVolIndex    word
  32992.   <--    30    ioVCrDate     long word
  32993.   <--    34    ioVLsMod      long word
  32994.   <--    38    ioVAtrb       word
  32995.   <--    40    ioVNmFls      word
  32996.   <--    42    ioVBitMap     word
  32997.   <--    44    ioVAllocPtr   word
  32998.   <--    46    ioVNmAlBlks   word
  32999.   <--    48    ioVAlBlkSiz   long word
  33000.   <--    52    ioVClpSiz     long word
  33001.   <--    56    ioAlBlSt      word
  33002.   <--    58    ioVNxtFNum    long word
  33003.   <--    62    ioVFrBlk      word
  33004.   <--    64    ioVSigWord    word
  33005.   <--    66    ioVDrvInfo    word
  33006.   <--    68    ioVDRefNum    word
  33007.   <--    70    ioVFSID       word
  33008.   <--    72    ioVBkUp       long word
  33009.   <--    76    ioVSeqNum     word
  33010.   <--    78    ioVWrCnt      long word
  33011.   <--    82    ioVFilCnt     long word
  33012.   <--    86    ioVDirCnt     long word
  33013.   <--    90    ioVFndrInfo   32 bytes
  33014.  
  33015. PBHGetVInfo is similar in function to PBGetVInfo but returns a larger parameter
  33016. block. In addition, PBHGetVInfo always returns the volume reference number in ioVRefNum
  33017. (regardless of what was passed in). Also, ioVNmAlBlks and ioVFrBlks are not clipped
  33018. as they are by PBGetVInfo.
  33019.  
  33020. Result codes    noErr       No error
  33021.                 nsvErr      No such volume
  33022.                 paramErr    No default volume
  33023.  
  33024. æKY PBHGetVInfoAsync
  33025. æFc Files.h
  33026. æT Function
  33027. æTN A607
  33028. æD #pragma parameter __D0 PBHGetVInfoAsync(__A0)
  33029. pascal OSErr PBHGetVInfoAsync(HParmBlkPtr paramBlock)
  33030.     = 0xA607; 
  33031. æDT #pragma parameter __D0 myVariable = PBHGetVInfoAsync()(__A0);
  33032. æRT 24, 66, 67, 77, 106, 157
  33033. æRI IV-130, N66-1, N67-1, N77-5  
  33034. æC 
  33035. Trap macro    _HGetVInfo
  33036.  
  33037. Parameter block
  33038.   -->    12    ioCompletion  pointer
  33039.   <--    16    ioResult      word
  33040.   <->    18    ioNamePtr     pointer
  33041.   <->    22    ioVRefNum     word
  33042.   -->    28    ioVolIndex    word
  33043.   <--    30    ioVCrDate     long word
  33044.   <--    34    ioVLsMod      long word
  33045.   <--    38    ioVAtrb       word
  33046.   <--    40    ioVNmFls      word
  33047.   <--    42    ioVBitMap     word
  33048.   <--    44    ioVAllocPtr   word
  33049.   <--    46    ioVNmAlBlks   word
  33050.   <--    48    ioVAlBlkSiz   long word
  33051.   <--    52    ioVClpSiz     long word
  33052.   <--    56    ioAlBlSt      word
  33053.   <--    58    ioVNxtFNum    long word
  33054.   <--    62    ioVFrBlk      word
  33055.   <--    64    ioVSigWord    word
  33056.   <--    66    ioVDrvInfo    word
  33057.   <--    68    ioVDRefNum    word
  33058.   <--    70    ioVFSID       word
  33059.   <--    72    ioVBkUp       long word
  33060.   <--    76    ioVSeqNum     word
  33061.   <--    78    ioVWrCnt      long word
  33062.   <--    82    ioVFilCnt     long word
  33063.   <--    86    ioVDirCnt     long word
  33064.   <--    90    ioVFndrInfo   32 bytes
  33065.  
  33066. PBHGetVInfo is similar in function to PBGetVInfo but returns a larger parameter
  33067. block. In addition, PBHGetVInfo always returns the volume reference number in ioVRefNum
  33068. (regardless of what was passed in). Also, ioVNmAlBlks and ioVFrBlks are not clipped
  33069. as they are by PBGetVInfo.
  33070.  
  33071. Result codes    noErr       No error
  33072.                 nsvErr      No such volume
  33073.                 paramErr    No default volume
  33074.  
  33075. æKY PBHOpen
  33076. æFc Files.h
  33077. æT Function
  33078. æD pascal OSErr PBHOpen(HParmBlkPtr paramBlock,Boolean async); 
  33079. æDT OSErr myVariable = PBHOpen((HParmBlkPtr) paramBlock,(Boolean) async);
  33080. æRT 204
  33081. æRI IV-136 
  33082. æC 
  33083. Trap macro    _HOpen
  33084.  
  33085. Parameter block
  33086.   -->    12    ioCompletion  pointer
  33087.   <--    16    ioResult      word
  33088.   -->    18    ioNamePtr     pointer
  33089.   -->    22    ioVRefNum     word
  33090.   <--    24    ioRefNum      word
  33091.   -->    27    ioPermssn     byte
  33092.   -->    28    ioMisc        pointer
  33093.   -->    48    ioDirID       long word
  33094.  
  33095. PBHOpen is identical to PBOpen except that it accepts a directory ID in ioDirID.
  33096.  
  33097. Result codes    noErr     No error
  33098.                 bdNamErr  Bad file name
  33099.                 dirNFErr  Directory not found or incomplete pathname
  33100.                 extFSErr  External file system
  33101.                 fnfErr    File not found
  33102.                 ioErr     I/O error
  33103.                 nsvErr    No such volume
  33104.                 opWrErr   File already open for writing
  33105.                 permErr   Attempt to open locked file for writing
  33106.                 tmfoErr   Too many files open
  33107.  
  33108. æKY PBHOpenSync
  33109. æFc Files.h
  33110. æT Function
  33111. æTN A200
  33112. æD #pragma parameter __D0 PBHOpenSync(__A0)
  33113. pascal OSErr PBHOpenSync(HParmBlkPtr paramBlock)
  33114.     = 0xA200; 
  33115. æDT #pragma parameter __D0 myVariable = PBHOpenSync()(__A0);
  33116. æRT 204
  33117. æRI IV-136 
  33118. æC 
  33119. Trap macro    _HOpen
  33120.  
  33121. Parameter block
  33122.   -->    12    ioCompletion  pointer
  33123.   <--    16    ioResult      word
  33124.   -->    18    ioNamePtr     pointer
  33125.   -->    22    ioVRefNum     word
  33126.   <--    24    ioRefNum      word
  33127.   -->    27    ioPermssn     byte
  33128.   -->    28    ioMisc        pointer
  33129.   -->    48    ioDirID       long word
  33130.  
  33131. PBHOpen is identical to PBOpen except that it accepts a directory ID in ioDirID.
  33132.  
  33133. Result codes    noErr     No error
  33134.                 bdNamErr  Bad file name
  33135.                 dirNFErr  Directory not found or incomplete pathname
  33136.                 extFSErr  External file system
  33137.                 fnfErr    File not found
  33138.                 ioErr     I/O error
  33139.                 nsvErr    No such volume
  33140.                 opWrErr   File already open for writing
  33141.                 permErr   Attempt to open locked file for writing
  33142.                 tmfoErr   Too many files open
  33143.  
  33144. æKY PBHOpenAsync
  33145. æFc Files.h
  33146. æT Function
  33147. æTN A600
  33148. æ